You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2011/08/23 21:34:28 UTC

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

     [ 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