diff options
| author | Alan Conway <aconway@apache.org> | 2007-09-21 18:26:37 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-09-21 18:26:37 +0000 |
| commit | 2f6d6ad7efd788b71204af67dff51b6233881e2e (patch) | |
| tree | a3d123bc112d12dfcef341a312f418624c98e342 /cpp/src/qpid/broker/DtxHandlerImpl.cpp | |
| parent | 3b80f903b6174b4346d7d7b537d783f628fe28d6 (diff) | |
| download | qpid-python-2f6d6ad7efd788b71204af67dff51b6233881e2e.tar.gz | |
Split broker::Session into:
broker::SessionState: session info (uuid etc.) + handler chains.
broker::SemanticState: session state for the SemanticHandler.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@578219 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/DtxHandlerImpl.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/DtxHandlerImpl.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cpp/src/qpid/broker/DtxHandlerImpl.cpp b/cpp/src/qpid/broker/DtxHandlerImpl.cpp index 7ed42d285b..5887d13f85 100644 --- a/cpp/src/qpid/broker/DtxHandlerImpl.cpp +++ b/cpp/src/qpid/broker/DtxHandlerImpl.cpp @@ -19,21 +19,20 @@ #include <boost/format.hpp> #include "Broker.h" -#include "Session.h" #include "qpid/framing/constants.h" using namespace qpid::broker; using namespace qpid::framing; using std::string; -DtxHandlerImpl::DtxHandlerImpl(Session& s) : HandlerImpl(s) {} +DtxHandlerImpl::DtxHandlerImpl(SemanticState& s) : HandlerImpl(s) {} // DtxDemarcationHandler: void DtxHandlerImpl::select() { - getSession().selectDtx(); + state.selectDtx(); } DtxDemarcationEndResult DtxHandlerImpl::end(u_int16_t /*ticket*/, @@ -43,7 +42,7 @@ DtxDemarcationEndResult DtxHandlerImpl::end(u_int16_t /*ticket*/, { try { if (fail) { - getSession().endDtx(xid, true); + state.endDtx(xid, true); if (suspend) { throw ConnectionException(503, "End and suspend cannot both be set."); } else { @@ -51,9 +50,9 @@ DtxDemarcationEndResult DtxHandlerImpl::end(u_int16_t /*ticket*/, } } else { if (suspend) { - getSession().suspendDtx(xid); + state.suspendDtx(xid); } else { - getSession().endDtx(xid, false); + state.endDtx(xid, false); } return DtxDemarcationEndResult(XA_OK); } @@ -72,9 +71,9 @@ DtxDemarcationStartResult DtxHandlerImpl::start(u_int16_t /*ticket*/, } try { if (resume) { - getSession().resumeDtx(xid); + state.resumeDtx(xid); } else { - getSession().startDtx(xid, getBroker().getDtxManager(), join); + state.startDtx(xid, getBroker().getDtxManager(), join); } return DtxDemarcationStartResult(XA_OK); } catch (const DtxTimeoutException& e) { |
