diff options
author | Gordon Sim <gsim@apache.org> | 2008-03-11 21:56:49 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-03-11 21:56:49 +0000 |
commit | 2250ec787ae5fb84fbebfee35bd9925ebd1dd679 (patch) | |
tree | db1768a5f613ca2a70187c52b96896ca1ccdcfdc /cpp | |
parent | ae650ea316f73b40db94a02556fd2cb335a7c816 (diff) | |
download | qpid-python-2250ec787ae5fb84fbebfee35bd9925ebd1dd679.tar.gz |
Enabled tx methods on final 0-10 path and converted tests accordingly
Added read/write- uuid to codec010
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@636121 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/broker/BrokerAdapter.h | 1 | ||||
-rw-r--r-- | cpp/src/qpid/broker/SessionAdapter.cpp | 20 | ||||
-rw-r--r-- | cpp/src/qpid/broker/SessionAdapter.h | 14 | ||||
-rw-r--r-- | cpp/xml/extra.xml | 16 |
4 files changed, 49 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/BrokerAdapter.h b/cpp/src/qpid/broker/BrokerAdapter.h index 3314ec6be3..0e69a03465 100644 --- a/cpp/src/qpid/broker/BrokerAdapter.h +++ b/cpp/src/qpid/broker/BrokerAdapter.h @@ -83,6 +83,7 @@ class BrokerAdapter : public HandlerImpl, public framing::AMQP_ServerOperations Exchange010Handler* getExchange010Handler() { throw framing::NotImplementedException("Class not implemented"); } Queue010Handler* getQueue010Handler() { throw framing::NotImplementedException("Class not implemented"); } Message010Handler* getMessage010Handler() { throw framing::NotImplementedException("Class not implemented"); } + Tx010Handler* getTx010Handler() { throw framing::NotImplementedException("Class not implemented"); } Execution010Handler* getExecution010Handler() { throw framing::NotImplementedException("Class not implemented"); } // Handlers no longer implemented in BrokerAdapter: diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp index 990727dda5..64bb7cdae3 100644 --- a/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/cpp/src/qpid/broker/SessionAdapter.cpp @@ -38,7 +38,8 @@ SessionAdapter::SessionAdapter(SemanticState& s) : exchangeImpl(s), queueImpl(s), messageImpl(s), - executionImpl(s) + executionImpl(s), + txImpl(s) {} @@ -405,6 +406,23 @@ void SessionAdapter::ExecutionHandlerImpl::exception(uint16_t /*errorCode*/, } + +void SessionAdapter::TxHandlerImpl::select() +{ + state.startTx(); +} + +void SessionAdapter::TxHandlerImpl::commit() +{ + state.commit(&getBroker().getStore()); +} + +void SessionAdapter::TxHandlerImpl::rollback() +{ + state.rollback(); +} + + Queue::shared_ptr SessionAdapter::HandlerHelper::getQueue(const string& name) const { Queue::shared_ptr queue; if (name.empty()) { diff --git a/cpp/src/qpid/broker/SessionAdapter.h b/cpp/src/qpid/broker/SessionAdapter.h index e83d58bc2f..e4c3a8676f 100644 --- a/cpp/src/qpid/broker/SessionAdapter.h +++ b/cpp/src/qpid/broker/SessionAdapter.h @@ -56,7 +56,7 @@ class SessionAdapter : public HandlerImpl, public framing::AMQP_ServerOperations Exchange010Handler* getExchange010Handler(){ return &exchangeImpl; } Queue010Handler* getQueue010Handler(){ return &queueImpl; } Execution010Handler* getExecution010Handler(){ return &executionImpl; } - + Tx010Handler* getTx010Handler(){ return &txImpl; } BasicHandler* getBasicHandler() { throw framing::NotImplementedException("Class not implemented"); } ExchangeHandler* getExchangeHandler(){ throw framing::NotImplementedException("Class not implemented"); } @@ -201,10 +201,22 @@ class SessionAdapter : public HandlerImpl, public framing::AMQP_ServerOperations }; + class TxHandlerImpl : public Tx010Handler, public HandlerHelper + { + public: + TxHandlerImpl(SemanticState& session) : HandlerHelper(session) {} + + void select(); + void commit(); + void rollback(); + }; + + ExchangeHandlerImpl exchangeImpl; QueueHandlerImpl queueImpl; MessageHandlerImpl messageImpl; ExecutionHandlerImpl executionImpl; + TxHandlerImpl txImpl; }; }} // namespace qpid::broker diff --git a/cpp/xml/extra.xml b/cpp/xml/extra.xml index 23df91e492..0acc2260ad 100644 --- a/cpp/xml/extra.xml +++ b/cpp/xml/extra.xml @@ -723,6 +723,22 @@ </method> </class> +<class name="tx010" index="5"> + <doc>blah, blah</doc> + <method name = "select" index="1"> + <doc>blah, blah</doc> + <chassis name="server" implement="MUST" /> + </method> + <method name = "commit" index="2"> + <doc>blah, blah</doc> + <chassis name="server" implement="MUST" /> + </method> + <method name = "rollback" index="3"> + <doc>blah, blah</doc> + <chassis name="server" implement="MUST" /> + </method> +</class> + <class name="exchange010" index="7"> <doc>blah, blah</doc> <method name = "declare" index="1"> |