summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2009-11-23 12:50:58 +0000
committerGordon Sim <gsim@apache.org>2009-11-23 12:50:58 +0000
commit08d70d83487d6c39cdef50f9c90e001787849286 (patch)
treea71b400af2659b03eb5aeb98cfce870495b14382 /cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
parent86fab2271457603040d420a6af7f88f2503cba77 (diff)
downloadqpid-python-08d70d83487d6c39cdef50f9c90e001787849286.tar.gz
QPID-664: Allow session to be specified as transactional; add basic test of transaction implementation.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@883325 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/amqp0_10/SessionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/amqp0_10/SessionImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
index 0c09f26039..bb47288e88 100644
--- a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
+++ b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
@@ -50,7 +50,7 @@ namespace qpid {
namespace client {
namespace amqp0_10 {
-SessionImpl::SessionImpl(ConnectionImpl& c) : connection(c) {}
+SessionImpl::SessionImpl(ConnectionImpl& c, bool t) : connection(c), transactional(t) {}
void SessionImpl::sync()
@@ -134,6 +134,7 @@ void SessionImpl::setSession(qpid::client::Session s)
qpid::sys::Mutex::ScopedLock l(lock);
session = s;
incoming.setSession(session);
+ if (transactional) session.txSelect();
for (Receivers::iterator i = receivers.begin(); i != receivers.end(); ++i) {
getImplPtr<Receiver, ReceiverImpl>(i->second)->init(session, resolver);
}