Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-2432

org.apache.qpid.client.XAResourceImpl doesn't handle get-/set- TransactionTimeout correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Later
    • None
    • JIRA Cleanup
    • JMS AMQP 0-x
    • None

    Description

      The XAResource interface[1] defines the transaction timeout to be a property of the resource itself, and not tied to any particular XID. In AMQP 0-10 however the DtxSetTimeout method is for a specific XID. At present org.apache.qpid.client.XAResourceImpl records the XID currently associated with the resource instance and uses that to implement get-/set- TransactionTimeout(). There are a couple of issues with this approach:

      (a) the associated xid is not nulled on committing the transaction, meaning that a call to setTransactionTimeout() immediately after a commit() will result in a request to the broker to set the timeout on that xid which violates the AMQP 0-10 protocol

      (b) the timeout set by a call to setTransactionTimeout() will only have effect on the currently associated xid which seems to violate the XAResource interfaces contract

      [1] http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/transaction/xa/XAResource.html#setTransactionTimeout%28int%29

      Attachments

        Activity

          People

            Unassigned Unassigned
            gsim Gordon Sim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: