Bug 1019186

Summary: allow a datasource class name to be used instead of forcing the use of the driver class
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Tom Fonteyne <tfonteyn>
Component: JCAAssignee: Tom Fonteyne <tfonteyn>
Status: CLOSED NOTABUG QA Contact: Martin Simka <msimka>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: bmaxwell, jawilson, jolee, msimka, tom.jenkinson
Target Milestone: ---   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 955648 Environment:
Last Closed: 2014-09-03 11:39:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Comment 1 Tom Fonteyne 2013-10-15 10:11:12 UTC
[tom@orac Branch_1_0]$ svn ci adapters/src/main/java/org/jboss/jca/adapters/jdbc/local/LocalManagedConnectionFactory.java -m "[bz-1019186] allow the use of a datasource class when set instead of always using the hardcoded driver class"
Sending        adapters/src/main/java/org/jboss/jca/adapters/jdbc/local/LocalManagedConnectionFactory.java
Transmitting file data.                                                          
Committed revision 114533.

Comment 2 Tom Fonteyne 2013-10-15 10:16:25 UTC
Example setup:

<datasources>
  <datasource jndi-name="java:jboss/datasources/oracleDS" pool-name="oracleDS" enabled="true" use-ccm="true" use-java-context="true" >
  <connection-url>     jdbc:oracle:thin:@oracleserver.redhat.com:1521:oracle</connection-url>
  <datasource-class>oracle.jdbc.pool.OracleDataSource</datasource-class>
  <connection-property name="URL">jdbc:oracle:thin:@oracleserver.redhat.com:1521:oracle</connection-property>
  <driver>oracle</driver>
  <security>
    <user-name>user</user-name>
    <password>pass</password>
  </security>
  <validation>
    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
  <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
  <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
                    </validation>
  </datasource>
  <drivers>
    <driver name="oracle" module="com.oracle.jdbc">
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
    </driver>
  </drivers>
</datasources>

Note the presence of both:
  connection-url: needed for JBoss
  connection-property name="URL"> : needed for the Oracle driver
Their setting should be identical

Comment 3 Martin Simka 2013-12-06 11:49:31 UTC
This fix is not in EAP 6.2.0.CR3/GA.

Comment 4 tom.jenkinson 2014-09-03 11:15:45 UTC
Hi guys,

This issue is quite old, is it still required or can it be dropped?

Thanks,
Tom

Comment 5 Martin Simka 2014-09-03 11:25:51 UTC
I think it's 6.4.0 RFE https://issues.jboss.org/browse/EAP6-151

Comment 6 tom.jenkinson 2014-09-03 11:36:05 UTC
Thanks Martin, so I guess that means we can close the BZ as its being tracked as an requirement in Jira?

Comment 7 Martin Simka 2014-09-03 11:39:09 UTC
I think so, closing

6.4.0 RFE tracked in https://issues.jboss.org/browse/EAP6-151