Hi
I have an application running on a JBoss 3.0.4 that connects to two different Oracle Databases. The first is an Oracle 8i (8.1.7.1.0) and the second a Oracle 9i (9.2.0.1.0)
I have two different oracle-service.xml (oracle8-service.xml & oracle9-service.xml) files to configure the Connections so far no problems.
The problem is that to connect to the 9i database i need to use a Oracle JDBC Driver 9.2.0.1.0, but this driver does not work 100% when connecting to the 8i database, and the Oracle JDBC driver 8.1.7.1 does not work to connect to the 9i database.
so I have one jar file (ojdbc-8.jar) that I want to use when connection to the 8i database and another jar (ojdbc-9.jar) that I want to use when I connect to the 9i database, both are placed in $JBOSS_HOME/server/default/lib.
the problem is the the Driver Classname is the same for both jars oracle.jdbc.driver.OracleDriver
from oracle8-service.xml
<config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@172.30.**.***:1521:SID</config-property> <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@172.20.**.***:1521:SID</config-property> <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
Just an idea, not sure if it would work:-
Package the oracle-ds.xml with the appropriate driver jar inside an ear and configure it to use it's own classloader.
Repeat the above for the second connection.