AutoCommit in XADatasource
kriscott May 4, 2004 4:45 PMI am using JBoss 3.2, Oracle 8.1.7
I have just swiched to XADatasource from none-XADatasource. Since I switched, insert or update statement doesn't seem to commit. I know this has something to do with autocommit and XADatasource. Can someone tell me how I could fix this? I have included my xmls below. By the way, my DAO does not set autocommit to false.
From ejb-xm -----------------------------
<message-driven>
<ejb-name>CollectPNIMDB</ejb-name>
<ejb-class>com.cec.nadb.ejb.jms.tl1.CollectPNIMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>jdbc/OracleDSNADBPhysical</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
<container-transaction>
<ejb-name>CollectPNIMDB</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
From oracle-xa-ds.xml ---------------------------------
<xa-datasource>
<jndi-name>OracleDSNADBPhysical</jndi-name>
<track-connection-by-tx>true</track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:oracle:thin:@NOCORACLE-02:1521:CECNADB</xa-datasource-property>
<xa-datasource-property name="User">physical</xa-datasource-property>
<xa-datasource-property name="Password">physical</xa-datasource-property>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
<!-- Checks the Oracle error codes and messages for fatal errors -->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
<no-tx-separate-pools/>
</xa-datasource>