From e3ed47f4171186818e8125addf71a37c926b21a6 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Sun, 18 Oct 2009 15:20:34 +0000 Subject: r817742 (the fix for QPID-2102) did not cover the case for 2pc transactions recovered in the prepared state; this fixes that case. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@826460 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/RecoveredDequeue.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/broker/RecoveredDequeue.cpp') diff --git a/cpp/src/qpid/broker/RecoveredDequeue.cpp b/cpp/src/qpid/broker/RecoveredDequeue.cpp index c4dd6d5f87..658fd5a89e 100644 --- a/cpp/src/qpid/broker/RecoveredDequeue.cpp +++ b/cpp/src/qpid/broker/RecoveredDequeue.cpp @@ -23,17 +23,24 @@ using boost::intrusive_ptr; using namespace qpid::broker; -RecoveredDequeue::RecoveredDequeue(Queue::shared_ptr _queue, intrusive_ptr _msg) : queue(_queue), msg(_msg) {} +RecoveredDequeue::RecoveredDequeue(Queue::shared_ptr _queue, intrusive_ptr _msg) : queue(_queue), msg(_msg) +{ + queue->recoverPrepared(msg); +} -bool RecoveredDequeue::prepare(TransactionContext*) throw(){ +bool RecoveredDequeue::prepare(TransactionContext*) throw() +{ //should never be called; transaction has already prepared if an enqueue is recovered return false; } -void RecoveredDequeue::commit() throw(){ +void RecoveredDequeue::commit() throw() +{ + queue->enqueueAborted(msg); } -void RecoveredDequeue::rollback() throw(){ +void RecoveredDequeue::rollback() throw() +{ msg->enqueueComplete(); queue->process(msg); } -- cgit v1.2.1