Currently my setup is:
in my ear META-INF/jboss-app.xml
<jboss-app>
<service>datasource-ds.xml</service>
</module>
and datasource-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/mydeployment</jndi-name>
<connection-url>jdbc:oracle:thin:@eir:myport:mydbname</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>myuser</user-name>
<password>mypassword</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
and it works when ojdbc5.jar is in my servername/lib.
How can I config my oracle driver information in my .ear file so that I can have two different ear deployments, one using Oracle 10g and one using oracle 11g?
EDIT: I phrased the question wrong. I meant how can I deploy an ear using the ojbc*.jar in the ear file, not in the server/lib directory. In my setup there are multiply different apps deployed and I want them all self contained. One of the apps uses 11g and the rest use 10g. Right now the ones that use 10g are ear files and the one that uses 11g is a war file so it works. Now I'm going to convert the ear files to war files(I don't need the ear functionality) in order to test how much Permgen space is used. So I guess my question is: I meant how can I deploy an ear using the ojbc*.jar in the ear file, not in the server/lib directory?