summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/TxBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/TxBuffer.cpp')
-rw-r--r--cpp/src/qpid/broker/TxBuffer.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/cpp/src/qpid/broker/TxBuffer.cpp b/cpp/src/qpid/broker/TxBuffer.cpp
index 7663cc525f..dad451776d 100644
--- a/cpp/src/qpid/broker/TxBuffer.cpp
+++ b/cpp/src/qpid/broker/TxBuffer.cpp
@@ -53,20 +53,22 @@ void TxBuffer::enlist(TxOp::shared_ptr op)
ops.push_back(op);
}
-bool TxBuffer::commitLocal(TransactionalStore* const store)
+//bool TxBuffer::commitLocal(TransactionalStore* const store)
+bool TxBuffer::commitLocal(AsyncTransactionalStore* const asyncTxnStore)
{
- if (!store) return false;
+ if (!asyncTxnStore) return false;
try {
- std::auto_ptr<TransactionContext> ctxt = store->begin();
- if (prepare(ctxt.get())) {
- store->commit(*ctxt);
- commit();
- return true;
- } else {
- store->abort(*ctxt);
- rollback();
- return false;
- }
+// std::auto_ptr<TransactionContext> ctxt = asyncTxnStore->begin();
+// if (prepare(ctxt.get())) {
+// asyncTxnStore->commit(*ctxt);
+// commit();
+// return true;
+// } else {
+// asyncTxnStore->abort(*ctxt);
+// rollback();
+// return false;
+// }
+ // TODO: kpvdr: add async local transaction commits here
} catch (std::exception& e) {
QPID_LOG(error, "Commit failed with exception: " << e.what());
} catch (...) {