1 Reply Latest reply on Feb 12, 2004 7:37 AM by darranl

    Problems with JCA Connections to two different Oracle databa

    jemagu

      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>

      from oracle9-service.xml
      <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>


      So there is no way to distinguish the two JDBC versions.
      How do I solve this? Is there a way to specify a jar in the oracle-service.xml, or can this be solved with some work around?