diff options
author | Kim van der Riet <kpvdr@apache.org> | 2012-06-25 19:11:55 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2012-06-25 19:11:55 +0000 |
commit | cbd4f9c22974db5f53b42a4326486ec8325b79cc (patch) | |
tree | 95986a4f10104ea2b9cc79c7463d0bc9ab451bcf /cpp/src/qpid | |
parent | b95f9427ede4a2045ac6424a6341de9185a13602 (diff) | |
download | qpid-python-cbd4f9c22974db5f53b42a4326486ec8325b79cc.tar.gz |
WIP - transactional consume path completed, still some testing to be done.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1353703 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r-- | cpp/src/qpid/broker/TxnBuffer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/TxnBuffer.cpp b/cpp/src/qpid/broker/TxnBuffer.cpp index d6662e5001..b975f09448 100644 --- a/cpp/src/qpid/broker/TxnBuffer.cpp +++ b/cpp/src/qpid/broker/TxnBuffer.cpp @@ -111,7 +111,6 @@ TxnBuffer::handleAsyncResult(const AsyncResultHandle* const arh) if (arh) { boost::shared_ptr<TxnAsyncContext> tac = boost::dynamic_pointer_cast<TxnAsyncContext>(arh->getBrokerAsyncContext()); if (arh->getErrNo()) { - tac->getTxnBuffer()->asyncLocalAbort(); std::cerr << "Transaction xid=\"" << tac->getTransactionContext().getXid() << "\": Operation " << tac->getOpStr() << ": failure " << arh->getErrNo() << " (" << arh->getErrMsg() << ")" << std::endl; tac->getTxnBuffer()->asyncLocalAbort(); @@ -153,7 +152,10 @@ TxnBuffer::asyncLocalCommit() //std::cout << "TTT TxnBuffer:asyncLocalCommit: COMMIT->COMPLETE" << std::endl << std::flush; commit(); m_state = COMPLETE; - //delete this; // TODO: ugly! Find a better way to handle the life cycle of this class + delete this; // TODO: ugly! Find a better way to handle the life cycle of this class + break; +// case COMPLETE: +//std::cout << "TTT TxnBuffer:asyncLocalCommit: COMPLETE" << std::endl << std::flush; break; default: ; //std::cout << "TTT TxnBuffer:asyncLocalCommit: Unexpected state " << m_state << std::endl << std::flush; @@ -183,7 +185,7 @@ TxnBuffer::asyncLocalAbort() //std::cout << "TTT TxnBuffer:asyncRollback: ROLLBACK->COMPLETE" << std::endl << std::flush; rollback(); m_state = COMPLETE; - //delete this; // TODO: ugly! Find a better way to handle the life cycle of this class + delete this; // TODO: ugly! Find a better way to handle the life cycle of this class default: ; //std::cout << "TTT TxnBuffer:asyncRollback: Unexpected state " << m_state << std::endl << std::flush; } |