[ 
https://issues.apache.org/jira/browse/QPID-3990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273742#comment-13273742
 ] 

[email protected] commented on QPID-3990:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5079/#review7820
-----------------------------------------------------------


Based on the description of the problem and the proposed solution the code 
appears to be doing whats expected.
There are a few whitespace errors that could be removed. On eclipse ctr-a and 
ctr-i should take care of it provided you have set tabs to whitespace.

For my own understand, could you please explain if there could be any 
implications/corner cases when a particular XAResource calls start and end on 
the other XAResources participating in the transaction even though they are all 
managed by the same Resource Manager. In particular is there some sort of 
ordering that should be preserved when this is called? How about error 
handling? What if one of the XAResources fail/throw exception when start or end 
is called ?
(I assume under normal circumstances the RM would call these methods and would 
be in a position to handle these situations. In the above case the XAResource 
(all though being called by an RM) would act as a proxy for it's siblings). Is 
my understanding correct ? If not are you able to briefly explain the flow here 
?

- rajith


On 2012-05-09 17:41:59, Weston Price wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/5079/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-05-09 17:41:59)
bq.  
bq.  
bq.  Review request for Ted Ross, Robbie Gemmell, rajith attapattu, and Rob 
Godfrey.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  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.
bq.  
bq.  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.
bq.  
bq.  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.
bq.  
bq.  
bq.  This addresses bug QPID-3990.
bq.      https://issues.apache.org/jira/browse/QPID-3990
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQXAResource.java
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/XAResourceImpl.java
 1336275 
bq.    
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAXAResource.java
 1336275 
bq.    
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/jms/xa/XAResourceTest.java
 1336275 
bq.  
bq.  Diff: https://reviews.apache.org/r/5079/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Added system test to XAResourceTest to exercise new behavior. Tested 
against both the Java and C++ Brokers using the 0.10 profile.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Weston
bq.  
bq.


                
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to