Configuring JDataStore to work with XA Transactions in JBoss Application Server

Abstract: Configuring JDataStore to work with XA Transactions in JBoss Application Server

  • Product : JDataStore
  • Version : 7
  • Component : XA Transactions
  • Platform : Windows, Linux, Solaris

Description:

JDataStore is an XA compliant database. How do I set up an XA compliant DataSource to work with JBoss Application server?

Answer:

JBoss ships with a sample datasource file for JDataStore but this is for local transactions only. You can set up your own datasource file and deploy it to JBoss. An example is shown below:

<?xml version="1.0" encoding="UTF-8"?>

<datasources>

�� <!-- Ensure that jdsserver.jar is deployed to the server's .lib directory -->

�� <xa-datasource>

���� <jndi-name>JDSXADS</jndi-name>

���� <track-connection-by-tx/>

���� <xa-datasource-class>com.borland.javax.sql.JdbcConnectionFactory</xa-datasource-class>

���� <xa-datasource-property name="ServerName">localhost</xa-datasource-property>

���� <xa-datasource-property name="PortNumber">2508</xa-datasource-property>

���� <xa-datasource-property name="NetworkProtocol">tcp</xa-datasource-property>

���� <xa-datasource-property name="DatabaseName">c:/jdatastore7/samples/jdatastore/datastores/employee.jds</xa-datasource-property>

���� <xa-datasource-property name="User">sysdba</xa-datasource-property>

���� <xa-datasource-property name="Password">masterkey</xa-datasource-property>

���� <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

���� <min-pool-size>2</min-pool-size>

�� ��<max-pool-size>10</max-pool-size>

���� <metadata>

�������� <type-mapping>InterBase</type-mapping>

���� </metadata>

�� </xa-datasource>

</datasources>