summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/broker/BrokerChannel.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-04-05 11:48:05 +0000
committerGordon Sim <gsim@apache.org>2007-04-05 11:48:05 +0000
commitca78f792bb1d381c85a8e64d1768c7abe7516f70 (patch)
tree8f7414b4268d406ac205b3405dc7720f886f1dde /qpid/cpp/src/broker/BrokerChannel.cpp
parent6aaec799e2dd38f39601fe5fe458cadf3834aae8 (diff)
downloadqpid-python-ca78f792bb1d381c85a8e64d1768c7abe7516f70.tar.gz
* Further (minor) changes to the interface between store and broker.
* TxBuffer now uses shared_ptr to TxOps (removed DeletingTxOp) * Queue now persists the field table of settings git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@525801 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/broker/BrokerChannel.cpp')
-rw-r--r--qpid/cpp/src/broker/BrokerChannel.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/qpid/cpp/src/broker/BrokerChannel.cpp b/qpid/cpp/src/broker/BrokerChannel.cpp
index 5f35f36da6..bd97c6f021 100644
--- a/qpid/cpp/src/broker/BrokerChannel.cpp
+++ b/qpid/cpp/src/broker/BrokerChannel.cpp
@@ -28,7 +28,6 @@
#include <boost/bind.hpp>
#include "BrokerChannel.h"
-#include "DeletingTxOp.h"
#include "../framing/ChannelAdapter.h"
#include "../QpidError.h"
#include "DeliverableMessage.h"
@@ -110,8 +109,8 @@ void Channel::begin(){
}
void Channel::commit(){
- TxAck txAck(accumulatedAck, unacked);
- txBuffer.enlist(&txAck);
+ TxOp::shared_ptr txAck(new TxAck(accumulatedAck, unacked));
+ txBuffer.enlist(txAck);
if(txBuffer.prepare(store)){
txBuffer.commit();
}
@@ -186,11 +185,12 @@ void Channel::handleInlineTransfer(Message::shared_ptr msg)
Exchange::shared_ptr exchange =
connection.broker.getExchanges().get(msg->getExchange());
if(transactional){
- TxPublish* deliverable = new TxPublish(msg);
+ TxPublish* deliverable(new TxPublish(msg));
+ TxOp::shared_ptr op(deliverable);
exchange->route(
*deliverable, msg->getRoutingKey(),
&(msg->getApplicationHeaders()));
- txBuffer.enlist(new DeletingTxOp(deliverable));
+ txBuffer.enlist(op);
}else{
DeliverableMessage deliverable(msg);
exchange->route(
@@ -223,10 +223,11 @@ void Channel::complete(Message::shared_ptr msg) {
connection.broker.getExchanges().get(msg->getExchange());
assert(exchange.get());
if(transactional) {
- std::auto_ptr<TxPublish> deliverable(new TxPublish(msg));
+ TxPublish* deliverable(new TxPublish(msg));
+ TxOp::shared_ptr op(deliverable);
exchange->route(*deliverable, msg->getRoutingKey(),
&(msg->getApplicationHeaders()));
- txBuffer.enlist(new DeletingTxOp(deliverable.release()));
+ txBuffer.enlist(op);
} else {
DeliverableMessage deliverable(msg);
exchange->route(deliverable, msg->getRoutingKey(),