[jboss-jira] [JBoss JIRA] Created: (JBAS-5472) ha-xa-datasource does not work with IBM DB2 Universal jdbc drivers

Anders Hammar (JIRA) jira-events at lists.jboss.org
Wed Apr 23 05:40:45 EDT 2008


ha-xa-datasource does not work with IBM DB2 Universal jdbc drivers
------------------------------------------------------------------

                 Key: JBAS-5472
                 URL: http://jira.jboss.com/jira/browse/JBAS-5472
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: JCA service
    Affects Versions: JBossAS-4.2.2.GA, JBossAS-4.0.5.GA
         Environment: Linux (unknown distribution), SUN Java 1.4.2, IBM DB2 Universal jdbc drivers v2.10.52, JBoss 4.0.5.GA
            Reporter: Anders Hammar
         Assigned To: Adrian Brock


I'm defining an ha xa datasource for two DB2 data sources, but this fails. The reason is that org.jboss.resource.JBossResourceException.HAXAManagedConnectionFactory tries to use the setURL method of the defined xa datasource class (com.ibm.db2.jcc.DB2XADataSource), which does not exist. For a non-ha xa DB2 datasource, server name, port number, and database name is defined independently.
I've checked in subversion and the same behavior/code seems to exist in JBoss AS 4.2.2. Also, I check the latest version av DB2 jdbc drivers (v2.11.24) and they do not have the setURL method either.

Below is my ds definition (ha):
<datasources>
  <ha-xa-datasource>
    <jndi-name>JNDI_NAME</jndi-name>
    <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
    <xa-datasource-property name="URL">jdbc:db2://HOST1:PORT1/DBNAME1|jdbc:db2://HOST2:PORT2/DBNAME2</xa-datasource-property>
    <url-property>URL</url-property>
    <url-delimeter>|</url-delimeter>
    <xa-datasource-property name="DriverType">4</xa-datasource-property>
    <user-name>USERNAME</user-name>
    <password>PASSWORD</password>
    <isSameRM-override-value>false</isSameRM-override-value>
    <track-connection-by-tx/>
    <transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation>
    <max-pool-size>50</max-pool-size>
  </ha-xa-datasource>
</datasources>

The same (well just one database) if ha is NOT used:
<datasources>
  <xa-datasource>
    <jndi-name>JNDI_NAME</jndi-name>
    <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
    <xa-datasource-property name="ServerName">HOST</xa-datasource-property>
    <xa-datasource-property name="PortNumber">PORT</xa-datasource-property>
    <xa-datasource-property name="DatabaseName">DBNAME</xa-datasource-property>
    <xa-datasource-property name="DriverType">4</xa-datasource-property>
    <user-name>USERNAME</user-name>
    <password>PASSWORD</password>
    <isSameRM-override-value>false</isSameRM-override-value>
    <track-connection-by-tx/>
    <transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation>
    <max-pool-size>10</max-pool-size>
  </xa-datasource>
</datasources>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list