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

Frederic Goossens (JIRA) jira-events at lists.jboss.org
Tue Oct 21 09:21:21 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBAS-5472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frederic Goossens updated JBAS-5472:
------------------------------------

    Attachment: HAXAManagedConnectionFactory_Patch.txt


replace the older function HAXAManagedConnectionFactory.initSelector() by the new one in the file.
For JBoss 4.0.5

> ha-xa-datasource does not work with IBM DB2 Universal jdbc drivers
> ------------------------------------------------------------------
>
>                 Key: JBAS-5472
>                 URL: https://jira.jboss.org/jira/browse/JBAS-5472
>             Project: JBoss Application Server
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: JCA service
>    Affects Versions: JBossAS-4.0.5.GA, JBossAS-4.2.2.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
>         Attachments: HAXAManagedConnectionFactory_Patch.txt
>
>
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list