[ https://issues.apache.org/jira/browse/QPID-3990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271617#comment-13271617 ]
jirapos...@reviews.apache.org commented on QPID-3990: ----------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5079/ ----------------------------------------------------------- Review request for Ted Ross, Robbie Gemmell, rajith attapattu, and Rob Godfrey. Summary ------- In fixing QPID-3263, an issue has cropped up when two XAResources have the same underlying ResourceManager(RM). Originally the isSameRM method returned false regardless of whether or not the RMs were the same. Since we now return true when two or more XAResources are involved, we get an ILLEGAL_STATE exception being that the DtxStart/DtxEnd calls are not paired for each XAResource because the TransactionManager (TM) treats the XAResource(s) as being on the same transaction branch. As a result, DtxEnd is only called on one resource. While it might make sense to simply roll back to the old behavior, this is not going to perform as well being that most TM's can optimize underlying transaction state with isSameRM is true. This has performance implications for the TM in terms of logging, management etc. The following patch/diff allows XAResources to be aware of each other in a transaction chain. When DtxEnd is called on one resource, the sibling XAResources.end method is called thereby matching the DtxStart/DtxEnd invocations appropriately allowing the transaction to complete. This addresses bug QPID-3990. https://issues.apache.org/jira/browse/QPID-3990 Diffs ----- http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/XAResourceImpl.java 1336275 http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAXAResource.java 1336275 http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/jms/xa/XAResourceTest.java 1336275 Diff: https://reviews.apache.org/r/5079/diff Testing ------- Added system test to XAResourceTest to exercise new behavior. Tested against both the Java and C++ Brokers using the 0.10 profile. Thanks, Weston > Multiple XAResources isSameRM behavior > -------------------------------------- > > Key: QPID-3990 > URL: https://issues.apache.org/jira/browse/QPID-3990 > Project: Qpid > Issue Type: Bug > Components: Java Client, JCA > Affects Versions: 0.14, 0.17 > Environment: All supported OS platforms. All supported JEE platforms. > Reporter: Weston M. Price > Assignee: Weston M. Price > Priority: Critical > > In fixing QPID-3263, an issue has cropped up when two XAResources have the > same underlying ResourceManager(RM). Originally the isSameRM method returned > false regardless of whether or not the RM's were the same. Since we now > return true when two or more XAResources are involved, we get an > ILLEGAL_STATE exception being that the DtxStart/DtxEnd calls are not paired > for each XAResource because the TransactionManager (TM) treats the > XAResource(s) as being on the same transaction branch. As a result, DtxEnd is > only called on one resource. > According to Gordon, this may be a discrepancy between XA and the AMQP .10 > specification. This has inadvertently worked in the JCA code due to bug in > the isSameRM method and the use of the QpidRAXAResourceWrapper. > While it might make sense to simply roll back to the old behavior, this is > not going to perform as well being that most TM's can optimize underlying > transaction state with isSameRM is true. This has performance implications > for the TM in terms of logging, management etc. > I have a fix for this issue that allows XAResources to be aware of each other > in a transaction chain. When DtxEnd is called on one resource, the sibling > XAResources.end method is called thereby matching the DtxStart/DtxEnd > invocations appropriately allowing the transaction to complete. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org