You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Guy Pardon (JIRA)" <ji...@apache.org> on 2011/03/31 17:31:06 UTC

[jira] [Created] (AMQ-3255) Rollback of unknown Xid gives unexpected XA errorCode: 0

Rollback of unknown Xid gives unexpected XA errorCode: 0
--------------------------------------------------------

                 Key: AMQ-3255
                 URL: https://issues.apache.org/jira/browse/AMQ-3255
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.3.0
         Environment: Java on Mac OSX
            Reporter: Guy Pardon


XA transaction managers will/should do recovery of Xids that they have logged. In some cases, these Xids may have disappeared already in the JMS broker. Typical example scenario:

1. The TM starts a new Xid with XAResource.start(xid)
2. The app does some SQL in the xid context
3. The TM calls XAResource.end(xid)
4. The TM then logs the xid as "to recover" before it attempts the XA prepare
5. The broker crashes and prepare fails
6. The broker comes back up, recovers, and does rollback of the not yet prepared xid
7. The TM will also attempt recovery by calling rollback for the xid in question

In that case (step 7), the errorCode should not be 0 (as it is now in ActiveMQ) but rather one of the XA_RB* error codes to be conform the semantics of XA exceptions.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3255) Rollback of unknown Xid gives unexpected XA errorCode: 0

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085927#comment-13085927 ] 

Timothy Bish commented on AMQ-3255:
-----------------------------------

I don't think this problem exists in the latest code, you might want to give the 5.5 release or a 5.6-SNAPSHOT build a try.

> Rollback of unknown Xid gives unexpected XA errorCode: 0
> --------------------------------------------------------
>
>                 Key: AMQ-3255
>                 URL: https://issues.apache.org/jira/browse/AMQ-3255
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.3.0
>         Environment: Java on Mac OSX
>            Reporter: Guy Pardon
>
> XA transaction managers will/should do recovery of Xids that they have logged. In some cases, these Xids may have disappeared already in the JMS broker. Typical example scenario:
> 1. The TM starts a new Xid with XAResource.start(xid)
> 2. The app does some SQL in the xid context
> 3. The TM calls XAResource.end(xid)
> 4. The TM then logs the xid as "to recover" before it attempts the XA prepare
> 5. The broker crashes and prepare fails
> 6. The broker comes back up, recovers, and does rollback of the not yet prepared xid
> 7. The TM will also attempt recovery by calling rollback for the xid in question
> In that case (step 7), the errorCode should not be 0 (as it is now in ActiveMQ) but rather one of the XA_RB* error codes to be conform the semantics of XA exceptions.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (AMQ-3255) Rollback of unknown Xid gives unexpected XA errorCode: 0

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQ-3255.
-----------------------------

    Resolution: Fixed

Believe the code is correct now.  Not test cases given to verify.  

> Rollback of unknown Xid gives unexpected XA errorCode: 0
> --------------------------------------------------------
>
>                 Key: AMQ-3255
>                 URL: https://issues.apache.org/jira/browse/AMQ-3255
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.3.0
>         Environment: Java on Mac OSX
>            Reporter: Guy Pardon
>
> XA transaction managers will/should do recovery of Xids that they have logged. In some cases, these Xids may have disappeared already in the JMS broker. Typical example scenario:
> 1. The TM starts a new Xid with XAResource.start(xid)
> 2. The app does some SQL in the xid context
> 3. The TM calls XAResource.end(xid)
> 4. The TM then logs the xid as "to recover" before it attempts the XA prepare
> 5. The broker crashes and prepare fails
> 6. The broker comes back up, recovers, and does rollback of the not yet prepared xid
> 7. The TM will also attempt recovery by calling rollback for the xid in question
> In that case (step 7), the errorCode should not be 0 (as it is now in ActiveMQ) but rather one of the XA_RB* error codes to be conform the semantics of XA exceptions.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira