1 Reply Latest reply on Aug 8, 2013 4:51 AM by Wolf-Dieter Fink

    Unable to perform XA Transcation

    Jijo Mathew Newbie

      Hi,

       

      I  trying to do an XA enabled transcation with my EJB 2.1 application deployed in EAP 5.1.  Backend database is Oracle. When I call the create() on my Entity Bean I  am getting the following exception in the log file

       

      WARN  com.arjuna.ats.jta.logging.loggerI18N - [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_PROTO for < 131075, 25, 23, 49459748102485453525856545258535048514898975258549797481024854535258565452585350485148989752585499 >

      2013-08-08 08:39:27,142 [http-localhost%2F127.0.0.1-8080-1] ERROR STDERR - javax.transaction.xa.XAException

      2013-08-08 08:39:27,142 [http-localhost%2F127.0.0.1-8080-1] ERROR STDERR -  at oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode(OracleXAResource.java:1045)

      2013-08-08 08:39:27,142 [http-localhost%2F127.0.0.1-8080-1] ERROR STDERR -  at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:153)

      2013-08-08 08:39:27,142 [http-localhost%2F127.0.0.1-8080-1] ERROR STDERR -  at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:213)

      2013-08-08 08:39:27,142 [http-localhost%2F127.0.0.1-8080-1] ERROR STDERR -  at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:799)

      2013-08-08 08:39:27,142 [http-localhost%2F127.0.0.1-8080-1] ERROR STDERR -  at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:510)

       

      My XA datasource configuration in the *-ds.xml is as below

       

      <datasources>

      <xa-datasource>

      <jndi-name>jdbc/myXaDS</jndi-name>

      <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:@host:1521:schema</xa-datasource-property>

      <xa-datasource-property name="User">user</xa-datasource-property>

      <xa-datasource-property name="Password">password</xa-datasource-property>

      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

      <no-tx-separate-pools>true</no-tx-separate-pools>

      <metadata>

      <type-mapping>Oracle9i</type-mapping>

      </metadata>

      </xa-datasource>

      <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"

      name="jboss.jca:service=OracleXAExceptionFormatter">

      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>

      </mbean>

      </datasources>

       

       

      The configuration <no-tx-separate-pools>true</no-tx-separate-pools> was not included initially. But while doing some research on this , it is suggested to include  set  no-tx-separate-pools  to true if we are using Oracle XA.  But a restart of the server after setting this to true does not make any diffrence. 

       

      Now I just udpated this Mbean property in the jmx console  to set to true and do a stop start of the Mbean. After this my application working fine with out any error.

       

      But if I restart the server at any time , the value of NoTxSeparatePools in the jmx console is setting back to false. Hence I am getting the same error again.  It seems like its not picking up the value from the *-ds.xml.

       

      Is there anything wrong in my configuration?  Any help on how  can I set  NoTxSeparatePools  to true permanantly ?

      Thanks

      Jijo