[ 
https://issues.apache.org/jira/browse/GERONIMO-4519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666594#action_12666594
 ] 

Lin Sun commented on GERONIMO-4519:
-----------------------------------

I have been reading the XA spec again on this topic today.    I have to say the 
spec is rather confusing.   Initially, I interpreted XA_RBROLLBACK as 
transaction has already been rolled back by the XAResource when the XAResource 
returns XA_RBROLLBACK as the result of XAResource.end() method.   However when 
I read the spec again today, I think that is not a safe conclusion.   Here is 
what I conclude:

If XA_RBROLLBACK arisen from XAResource.end() method, it means "The resource 
manager marked the transaction branch rollback-only for an unspecified 
reason.", per page 80 of XA+ spec, version 2 from the open group.

If XA_RBROLLBACK arisen from XAResource.commit() method, it means "The resource 
manager rolled back the transaction branch for an unspecified reason.", per page 
73 of XA spec.   The spec gave the same explanation for XA_RBROLLBACK when 
arisen from XAResource.rollback() or prepare() method.

So when TM calls XAResource.end() method with TMFAIL flag and got a 
XA_RBROLLBACK exception, I think TM should continue with the rollback method 
and call the XAResource.rollback() explicitly to ensure the transaction is 
rolled back.    Comments?


> When XAException.XA_RBROLLBACK arisen from XAResource.end, TM should not send 
> rollback request again to the XAResource
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-4519
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4519
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: transaction manager
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Lin Sun
>            Assignee: Lin Sun
>             Fix For: 2.1.4, 2.2
>
>
> as titled, when XAException is XA_RBROLLBACK from XAResource.end, which 
> indicates that XAResource has already rolled back the transaction, there is 
> no need
>  to send rollback request to the XAResource.

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

Reply via email to