2 Replies Latest reply on Jul 31, 2006 1:12 PM by Moises Quinto

    How to use JTA in informix,please help!

    yan zhensong Newbie

      I am using jboss4.0.4+informix+struts.
      I want to use JTA in my application,
      but in the same "server",can't use JTA,why?

        • 1. Re: How to use JTA in informix,please help!
          yan zhensong Newbie

          My informix server is IDS9.40.FC3
          JDBC driver is JDBC 3.00.JC3
          I use two Databases for test,they are in the same sever,
          My configure is below:
          testdb1-xa-ds.xml

          <xa-datasource>
          <jndi-name>jdbc/testdb1</jndi-name>
          <xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
          <!-- Not supported by latter drivers
          <xa-datasource-property name="IfxWAITTIME">10</xa-datasource-property>
          -->
          <xa-datasource-property name="Description">testdb1@srv1</xa-datasource-property>
          <xa-datasource-property name="IfxIFXHOST">127.0.0.1</xa-datasource-property>
          <xa-datasource-property name="PortNumber">2111</xa-datasource-property>
          <xa-datasource-property name="DatabaseName">testdb1</xa-datasource-property>
          <xa-datasource-property name="ServerName">srv1</xa-datasource-property>
          <xa-datasource-property name="User">sa</xa-datasource-property>
          <xa-datasource-property name="Password">sa</xa-datasource-property>
          <user-name>sa</user-name>
          sa
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
          <!-- sql to call when connection is created
          <new-connection-sql>some arbitrary sql</new-connection-sql>
          -->
          <!-- sql to call on an existing pooled connection when it is obtained from pool
          <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
          -->
          <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

          <type-mapping>InformixDB</type-mapping>

          </xa-datasource>


          testdb2-xa-ds.xml

          <xa-datasource>
          <jndi-name>jdbc/testdb2</jndi-name>
          <xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
          <!-- Not supported by latter drivers
          <xa-datasource-property name="IfxWAITTIME">10</xa-datasource-property>
          -->
          <xa-datasource-property name="Description">testdb2@srv1</xa-datasource-property>
          <xa-datasource-property name="IfxIFXHOST">127.0.0.1</xa-datasource-property>
          <xa-datasource-property name="PortNumber">2111</xa-datasource-property>
          <xa-datasource-property name="DatabaseName">testdb2</xa-datasource-property>
          <xa-datasource-property name="ServerName">srv1</xa-datasource-property>
          <xa-datasource-property name="User">sa</xa-datasource-property>
          <xa-datasource-property name="Password">sa</xa-datasource-property>
          <user-name>sa</user-name>
          sa
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
          <!-- sql to call when connection is created
          <new-connection-sql>some arbitrary sql</new-connection-sql>
          -->
          <!-- sql to call on an existing pooled connection when it is obtained from pool
          <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
          -->
          <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

          <type-mapping>InformixDB</type-mapping>

          </xa-datasource>