0 Replies Latest reply on Sep 12, 2018 3:17 PM by apeggins

    XA transaction not stopping after xa start fail

    apeggins

      Hello,

       

      I'm testing an XA resource adapter on WildFly 11.0.0.CR1. I have a test that uses container managed EJBs to perform an XA two phase commit. One branch of the transaction communicates with a DB2 database via the XA resource adapter and the other branch communicates with an Oracle database via JDBC. In this specific instance I’m checking behavior when the first branch—the XA resource adapter—fails on an XA start.  In WildFly 10.1.0.CR1 the transaction would stop after receiving the XA start error. However, when testing with WildFly 11 I'm seeing the transaction continue processing after receiving the XA start error. After some additional tests I've found the following differences between WildFly 11 and 10.1. I've attached the stack traces for both WildFly 11 and 10.1.

       

      In the attached log for 10.1 (WF10 xa start error.txt) you can see the enlistResource fail on line 447:

      ARJUNA016061: TransactionImple.enlistResource - XAResource.start returned: ARJUNA016099: Unknown error code:0...

       

      On line 1314 you can see the error enlisting the resource being thrown:

      [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (default task-2) Check enlisted org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@92e37b...

      [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (default task-2) Error enlisting resource in transaction…

       

      In WildFly 11 on line 439 of the attached log (WF11 xa start error.txt) you can see the enlistResource fail just like it did in 10.1:

      ARJUNA016061: TransactionImple.enlistResource - XAResource.start returned: ARJUNA016099: Unknown error code:0...

       

      But then on line 1081 it successfully enlists the resource which allows it to continue on with the transaction:

      [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (default task-2) Enlisted resource org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@99abff...

      [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (default task-2) Check enlisted…

       

      I'd like for the transaction to stop after receiving the fail instead of continuing on. I've deployed the same resource adapter and EJBs to both 10.1 and 11 so I've made no code changes. Is there a way to get WildFly 11 to mimic the behavior I'm seeing in WildFly 10.1?

       

      I’m using jdk1.8.0_73 on Windows 7 for both WildFly 11 and WildFly 10.1.

       

      Thank you in advance,

      Amy