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

JTA ejb propagated transaction does not fail when the target server restarted during transaction lifetime

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.1.0.ER2
    • 7.1.0.DR18
    • EJB, Transactions
    • None
    • Hide

      I added the testcase reproducing the issue to qa crashrec testsuite. The test uses jms broker as the resource, but the forum mentions database. But the behavior is the same.

      Show
      I added the testcase reproducing the issue to qa crashrec testsuite. The test uses jms broker as the resource, but the forum mentions database. But the behavior is the same. getting the testsuite: git clone http://git.app.eng.bos.redhat.com/git/jbossqe-eap-tests-transactions.git downloading the eap http://download.eng.brq.redhat.com/devel/candidates/JBEAP/JBEAP-7.1.0-DR18 export JBOSS_HOME=... mvn clean verify -am -pl jbossts -DfailIfNoTests=false -fn -Djbossts.noJTS -Dtest=TxPropagationJMSCrashRecoveryTestCase#crashOnePhaseOnServerBeforeClientEndsTransaction

      I was investigating on the use case described at https://developer.jboss.org/message/972213 and from what I can see this is still an issue for WFTC.

      The case is following

      1. server 1 starts transaction
      2. server 1 calls server 2 via ejb call, the context is propagated
      3. server 2 does a business logic (db insertion, jms call)
      4. server 2 returns to server 1
      5. server 1 continue with long time processing
      6. meanwhile server 2 is restarted. that leads to the cleaning of the notion about the propagated transaction
      7. server 1 ends its processing and tries to commit (prepare)
      8. server 1 should fail as server 2 does not know the Xid to commit/prepare

      The current WFTC implementation is not failing and leaving the execution to proceed with success. It shows no error. For one phase commit the return of the commit is TwoPhaseOutcome.FINISH_OK, for two-phase commit the return is TwoPhaseOutcome.PREPARE_READONLY.

            flaviarnn Flavia Rainone
            ochaloup@redhat.com Ondrej Chaloupka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: