Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-4632

JTA does not set transaction timeout for XAResource for propagated transactions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.0.0.GA
    • EJB, Transactions
    • None
    • Hide

      It's possible to run testcase of txn crashrecovery testsuite

      export JBOSS_HOME=path/to/eap7.0.0
      mvn clean verify -am -pl jbossts -DfailIfNoTests=false -fn -Dtest=TxTimeoutJMSCrashRecoveryTestCase#txnTimeoutServerDuringPrepare -Djbossts.noJTS -Dno.cleanup.at.teardown
      

      note: test will not fail as correct behavior is under discussion at https://developer.jboss.org/thread/269718

      Show
      It's possible to run testcase of txn crashrecovery testsuite export JBOSS_HOME=path/to/eap7.0.0 mvn clean verify -am -pl jbossts -DfailIfNoTests= false -fn -Dtest=TxTimeoutJMSCrashRecoveryTestCase#txnTimeoutServerDuringPrepare -Djbossts.noJTS -Dno.cleanup.at.teardown note: test will not fail as correct behavior is under discussion at https://developer.jboss.org/thread/269718

      I can see a fact that transaction timeout is not provided by subordinate transaction when passed by ejb remote call when JTA transaction are used.

      Even when transaction timeout is defined (it could be seen that timeout is used when xaresources is used on client) the server where transaction is propagated shows xa resources using the default timeou value.

      Client server (caller) - timeout is 6 seconds

      2016-05-19 11:50:51,461 TRACE [com.arjuna.ats.jta] (default task-18) XAResourceRecord.topLevelCommit for XAResourceRecord < resource:TestXAResource(TestXAResourceCommon(id:483, xid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:57a802d4:573d8c57:20, subordinatenodename=null, eis_name=java:/TestXAResource-483 >, timeout:6, prepareReturn:0)), txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:57a802d4:573d8c57:20, subordinatenodename=null, eis_name=java:/TestXAResource-483 >, heuristic: TwoPhaseOutcome.FINISH_OK, product: Crash Recovery Test/EAP Test, jndiName: java:/TestXAResource-483 com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@7b44816f >, record id=0:ffff7f000001:57a802d4:573d8c57:21
      

      Server (callee) - uses timeout 0 seconds

      2016-05-19 11:50:39,374 TRACE [com.arjuna.ats.jta] (default task-12) XAResourceRecord.topLevelPrepare for XAResourceRecord < resource:TestXAResource(TestXAResourceCommon(id:502, xid:< formatId=131077, gtrid_length=29, bqual_length=37, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:3b603de1:573d8c5f:17, subordinatenodename=2, eis_name=java:/TestXAResource-502 >, timeout:0, prepareReturn:0)), txid:< formatId=131077, gtrid_length=29, bqual_length=37, tx_uid=0:ffff7f000001:57a802d4:573d8c57:11, node_name=1, branch_uid=0:ffff7f000001:3b603de1:573d8c5f:17, subordinatenodename=2, eis_name=java:/TestXAResource-502 >, heuristic: TwoPhaseOutcome.FINISH_OK, product: Crash Recovery Test/EAP Test, jndiName: java:/TestXAResource-502 com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@4f35ed3f >, record id=0:ffff7f000001:3b603de1:573d8c5f:18
      

      Scenario that I'm running is

      1. enlist jms xa resource on client
      2. call to second server, it means enlist ejb remoting xa resource to transaction
      3. enlist test xa on server
      4. enlist jms xa resource on server
      5. enlist test xa on client
      6. starting 2PC
      7. prepare jms xa resource on server
      8. prepare ejb remoting xa resource on server
      9. prepare test xa resource on client
      10. transaction timeout is hit
      11. if underlying jms resource timeouts then XAResource.prepare call fails with XAER_NOTA and the whole transaction is rolled back
        #
        (attaching server.log files for EAP 7.0.0/Narayana 5.2.16.Final where jbossts is caller and jbossts2 is callee)

              rhn-engineering-cdewolf Carlo de Wolf
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: