JBoss and XA distributed transactions
stoyanpetrov Sep 21, 2006 5:00 PMHi All,
I use Oracle Database 10g Express Edition + jboss-4.0.4.GA-Patch1
and i try to use XA distributed transaction, but i have strange error for me:
21:36:44,753 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14] errorCode=XAER_RMERR
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:937)
21:36:44,769 WARN [TransactionImpl] xa error: -3 (A resource manager error has occured in the transaction branch.); oracle error: 6550; oracle sql error: 0;
oracle.jdbc.xa.OracleXAException
21:36:44,800 WARN [SettingsFactory] Could not obtain connection metadata
org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14]); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14]))
Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14])
I see support JBoss page:
http://wiki.jboss.org/wiki/Wiki.jsp?page=IHaveProblemsWithOracleXA
I don't understand wery well:
Configuring Oracle Database for XA Support You can configure Oracle database to support XA resources.
Because when i unstall my db i cann't found any about XA support.I think by default
oracle after 9.3 ver support XA transactions
Some ideas? please
my xxx-ds.xml is: (and i put class12.jar in jboss/server/default/lib from my oracle client)
<?xml version="1.0" encoding="UTF-8"?>
<xa-datasource>
<jndi-name>OracleDSXXX</jndi-name>
<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:oci8:@my_vmwareoa</xa-datasource-property>
<xa-datasource-property name="User">admin</xa-datasource-property>
<xa-datasource-property name="Password">12345</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/>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>Oracle9i</type-mapping>
</xa-datasource>
Thanks in advance!
Stoyan