I trying to configure an XA DB2 DataSource, xa-datasource
(based on http://community.jboss.org/wiki/SetUpADB2Datasource) using com.ibm.db2.jcc.DB2XADataSource
class (local-tx-datasource
works using the com.ibm.db2.jcc.DB2Driver
). The target server is DB2 Connect V9.7
Actual xa-datasource config:
<xa-datasource>
<jndi-name>jdbc/DB2ServerDS</jndi-name>
<use-java-context>false</use-java-context>
<track-connection-by-tx>true</track-connection-by-tx>
<xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:db2://db2server:50000/FINDB</xa-datasource-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DB2ExceptionSorter</exception-sorter-class-name>
<xa-datasource-property name="DriverType">4</xa-datasource-property>
<check-valid-connection-sql>SELECT * FROM ACC.SETTINGS 1=2</check-valid-connection-sql>
<user-name>findbuser</user-name>
<password>findbuser</password>
<min-pool-size>2</min-pool-size>
<max-pool-size>10</max-pool-size>
<blocking-timeout-millis>10000</blocking-timeout-millis>
<type-mapping>DB2</type-mapping>
<no-tx-separate-pools/>
</xa-datasource>
and the following jar in the JBoss node lib directory:
db2umplugin.jar
db2policy.jar
db2dbgm.jar
db2jcc_license_cu.jar
db2jcc.jar
db2jcc4.jar
db2java.zip
db2jcc_license_cisuz.jar
but i'm getting the error:
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.57.82] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path: ERRORCODE=-4472, SQLSTATE=null
The driver for XA is trying to use native libraries, despite the fact that i'm using a JDBC Type 4 driver.
Why is the driver trying to use native libraries? Is there anything i need to add to my config?