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

    Problems with JCA Connections to two different Oracle databa

    jemagu Newbie

      I have an application running on a JBoss 3.0.4 that connects to two different Oracle Databases. The first is an Oracle 8i ( and the second a Oracle 9i (

      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, but this driver does not work 100% when connecting to the 8i database, and the Oracle JDBC driver 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?