Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6407

TestResourceAdapterTxInflow can't assume one phase commit

    XMLWordPrintable

Details

    Description

      The TestWork class in TestResourceAdapterTxInflow implements XAResource but has some methods stubbed out to throw exceptions, on the basis that they are never invoked. One such is prepare(), on the assumption that a transaction containing only a single resource will always use one phase commit, skipping the prepare call. This is not the case. Whilst 1PC is a useful performance optimisation, it's not required. Also, it's not possible in certain distributed transaction cases, depending on the use of interposition. In particular, the JBossTS JTS implementation won't always use 1PC, which can cause this test case to fail.

      Fix: modify TestWork.prepare to return XAResource.XA_OK instead of throwing XAException

      Attachments

        Activity

          People

            jpederse@redhat.com Jesper Pedersen
            rhn-engineering-jhallida Jonathan Halliday
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: