From 2f6d6ad7efd788b71204af67dff51b6233881e2e Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 21 Sep 2007 18:26:37 +0000 Subject: 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 --- cpp/src/qpid/broker/DtxHandlerImpl.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'cpp/src/qpid/broker/DtxHandlerImpl.cpp') 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 #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) { -- cgit v1.2.1