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

                 Key: QPID-2432
                 URL: https://issues.apache.org/jira/browse/QPID-2432
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
            Reporter: Gordon Sim
            Assignee: Rajith Attapattu


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to