activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] [Resolved] (AMQ-3872) Implement "exactly once" delivery with JDBC and XA in the event of a failure post prepare
Date Fri, 01 Jun 2012 14:39:24 GMT


Gary Tully resolved AMQ-3872.

    Resolution: Fixed
      Assignee: Gary Tully

fix in

JDBC 2PC is now two JDBC ops, an insert/update in prepare and an update for the outcome.
An additional xid column is needed in both the acks and messages table. A non null value for
the xid means that the update is pending the outcome of the xa transaction matching that xid.
Recovery scans for non null xid and recreates the appropriate state pending the outcome.
Pending transactions are visible via jmx so that they can be forced.
> Implement "exactly once" delivery with JDBC and XA in the event of a failure post prepare
> -----------------------------------------------------------------------------------------
>                 Key: AMQ-3872
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.6.0
>         Environment: jdbc persistence adapter, XA
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>              Labels: JDBC, MessageStore, XA, recovery
>             Fix For: 5.7.0
> JDBC store does not honor the prepare phase so a broker failure after prepare always
results in a rollback which is in violation of the contract.
> In the cases where XA is required, the store needs to do its best to respect a prepare
> Having the TM use last resource commit one phase (or the one phase commit optimisation)
avoids this issue but is not always possible.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message