[
https://issues.apache.org/jira/browse/QPID-2432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842116#action_12842116
]
Rajith Attapattu commented on QPID-2432:
----------------------------------------
I added fix in rev 919666 in Qpid trunk.
Modified the XAResourceImpl to maintain the timeout value and set it to any XID
in the start method if the time value > 0
Also the XID nulled after commit, rollback and forget, to prevent a timeout
being set on an invalid xid.
The setTimeout method will only set the timeout if xid is not null and if the
timeout value is different from the previous value.
Modified the test cases in FaultTest to adhere to the correct behaviour and
also added a new test case to cover the issue mentioned in the JIRA.
> 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]