qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r578975 - in /incubator/qpid/trunk/qpid: cpp/src/ cpp/src/qpid/broker/ cpp/src/tests/ specs/
Date Mon, 24 Sep 2007 21:15:49 GMT
Author: aconway
Date: Mon Sep 24 14:15:46 2007
New Revision: 578975

URL: http://svn.apache.org/viewvc?rev=578975&view=rev
Log:
2007-09-24  Alan Conway  <aconway@redhat.com>

	* cpp/src/qpid/broker/SessionManager.cpp: Manage suspended sessions.
	Replaces SuspendedSessions.
	* cpp/src/qpid/broker/SessionState.cpp: Work with SessionManager.
	* cpp/src/qpid/broker/SessionHandler.cpp: Owns SessionState.
	* cpp/src/qpid/broker/Connection.h, .cpp: Owns session handlers.
	* cpp/src/qpid/broker/Broker.h: Added SessionManager member.
	* cpp/src/Makefile.am: Added broker/SessionManager.cpp
	* amqp.0-10-preview.xml: Added session-busy and channel-busy constants.
	* cpp/src/tests/.valgrind.supp-default: Added suppresssions for F7.

Added:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp
      - copied, changed from r578221, incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h
      - copied, changed from r578221, incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.h
Removed:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.h
    incubator/qpid/trunk/qpid/cpp/src/tests/Session.cpp
Modified:
    incubator/qpid/trunk/qpid/cpp/src/Makefile.am
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h
    incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp-default
    incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/run_test
    incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml

Modified: incubator/qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/Makefile.am?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/src/Makefile.am Mon Sep 24 14:15:46 2007
@@ -177,6 +177,8 @@
   qpid/broker/SemanticState.cpp \
   qpid/broker/SessionState.h \
   qpid/broker/SessionState.cpp \
+  qpid/broker/SessionManager.h \
+  qpid/broker/SessionManager.cpp \
   qpid/broker/SessionHandler.h \
   qpid/broker/SessionHandler.cpp \
   qpid/broker/SemanticHandler.cpp \

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h Mon Sep 24 14:15:46 2007
@@ -29,6 +29,7 @@
 #include "ExchangeRegistry.h"
 #include "MessageStore.h"
 #include "QueueRegistry.h"
+#include "SessionManager.h"
 #include "qpid/Options.h"
 #include "qpid/Plugin.h"
 #include "qpid/Url.h"
@@ -103,6 +104,8 @@
     uint64_t getStagingThreshold() { return stagingThreshold; }
     DtxManager& getDtxManager() { return dtxManager; }
 
+    SessionManager& getSessionManager() { return sessionManager; }
+    
   private:
     sys::Acceptor& getAcceptor() const;
 
@@ -117,6 +120,7 @@
     ConnectionFactory factory;
     DtxManager dtxManager;
     HandlerUpdaters handlerUpdaters;
+    SessionManager sessionManager;
 
     static MessageStore* createStore(const Options& config);
 };

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Mon Sep 24 14:15:46 2007
@@ -94,13 +94,12 @@
 }
 
 SessionHandler& Connection::getChannel(ChannelId id) {
-    boost::optional<SessionHandler>& ch = channels[id];
-    if (!ch) {
-        ch = boost::in_place(boost::ref(*this), id); 
+    ChannelMap::iterator i=channels.find(id);
+    if (i == channels.end()) {
+        i = channels.insert(id, new SessionHandler(*this, id)).first;
     }
-    return *ch;
+    return *i;
 }
-
 
 }}
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h Mon Sep 24 14:15:46 2007
@@ -38,7 +38,7 @@
 #include "ConnectionHandler.h"
 #include "SessionHandler.h"
 
-#include <boost/optional.hpp>
+#include <boost/ptr_container/ptr_map.hpp>
 
 namespace qpid {
 namespace broker {
@@ -82,9 +82,7 @@
     void closeChannel(framing::ChannelId channel);
 
   private:
-
-    // Use boost::optional to allow default-constructed uninitialized entries in the map.
-    typedef std::map<framing::ChannelId, boost::optional<SessionHandler> >ChannelMap;
+    typedef boost::ptr_map<framing::ChannelId, SessionHandler> ChannelMap;
     typedef std::vector<Queue::shared_ptr>::iterator queue_iterator;
 
     framing::ProtocolVersion version;

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp Mon Sep 24 14:15:46 2007
@@ -35,7 +35,7 @@
       connection(c), channel(ch), proxy(out),
       ignoring(false) {}
 
-SessionHandler::~SessionHandler() {}
+SessionHandler::~SessionHandler() { }
 
 namespace {
 ClassId classId(AMQMethodBody* m) { return m ? m->amqpMethodId() : 0; }
@@ -53,7 +53,7 @@
     try {
         if (m && m->invoke(this))
             return;
-        else if (session)
+        else if (session.get())
             session->in(f);
         else if (!ignoring)
             throw ChannelErrorException(
@@ -76,7 +76,7 @@
 }
 
 void SessionHandler::assertOpen(const char* method) {
-    if (!session)
+     if (!session.get())
         throw ChannelErrorException(
             QPID_MSG(""<<method<<" failed: No session for channel "
                      << getChannel()));
@@ -85,7 +85,7 @@
 void SessionHandler::assertClosed(const char* method) {
     // FIXME aconway 2007-08-31: Should raise channel-busy, need
     // to update spec.
-    if (session)
+    if (session.get())
         throw PreconditionFailedException(
             QPID_MSG(""<<method<<" failed: "
                      << channel << " already open on channel "
@@ -94,7 +94,9 @@
 
 void  SessionHandler::open(uint32_t detachedLifetime) {
     assertClosed("open");
-    session.reset(new SessionState(*this, detachedLifetime));
+    std::auto_ptr<SessionState> state(
+        connection.broker.getSessionManager().open(*this, detachedLifetime));
+    session.reset(state.release());
     getProxy().getSession().attached(session->getId(), session->getTimeout());
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h Mon Sep 24 14:15:46 2007
@@ -27,6 +27,8 @@
 #include "qpid/framing/AMQP_ClientProxy.h"
 #include "qpid/framing/amqp_types.h"
 
+#include <boost/noncopyable.hpp>
+
 namespace qpid {
 namespace broker {
 
@@ -37,11 +39,10 @@
  * A SessionHandler is associated with each active channel. It
  * receives incoming frames, handles session commands and manages the
  * association between the channel and a session.
- *
- * SessionHandlers can be stored in a map by value.
  */
 class SessionHandler : public framing::FrameHandler::InOutHandler,
-                       private framing::AMQP_ServerOperations::SessionHandler
+                       private framing::AMQP_ServerOperations::SessionHandler,
+                       private boost::noncopyable
 {
   public:
     SessionHandler(Connection&, framing::ChannelId);
@@ -84,8 +85,8 @@
     Connection& connection;
     const framing::ChannelId channel;
     framing::AMQP_ClientProxy proxy;
-    shared_ptr<SessionState> session;
     bool ignoring;
+    std::auto_ptr<SessionState> session;
 };
 
 }} // namespace qpid::broker

Copied: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp (from r578221, incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.cpp)
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp?p2=incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp&p1=incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.cpp&r1=578221&r2=578975&rev=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp Mon Sep 24 14:15:46 2007
@@ -18,43 +18,67 @@
  * under the License.
  *
  */
-#include "SuspendedSessions.h"
+
+#include "SessionManager.h"
+#include "SessionState.h"
+#include "qpid/framing/reply_exceptions.h"
+#include "qpid/memory.h"
+
 #include <boost/bind.hpp>
 
+#include <algorithm>
+#include <functional>
+
 namespace qpid {
 namespace broker {
 
-using namespace framing;
 using namespace sys;
-using namespace boost;
-typedef Mutex::ScopedLock Lock;
+using namespace framing;
+using std::make_pair;
 
-void SuspendedSessions::suspend(SessionState& s) {
-    Lock l(lock);
-    assert(s.state == SessionState::ACTIVE);
-    if (s.timeout == 0) 
-        s.state = SessionState::CLOSED;
-    else {
-        AbsTime expires(now(), Duration(s.timeout*TIME_SEC));
-        suspended.insert(std::make_pair(expires, s));
-        s.state = SessionState::SUSPENDED;
-    }
-}
+SessionManager::SessionManager() {}
+
+SessionManager::~SessionManager() {}
 
-SessionState SuspendedSessions::resume(const Uuid& id)
+std::auto_ptr<SessionState>  SessionManager::open(
+    SessionHandler& h, uint32_t timeout_)
 {
-    Lock l(lock);
-    Map::iterator notExpired = suspended.lower_bound(now());
-    suspended.erase(suspended.begin(), notExpired);
-    Map::iterator i = suspended.begin();
-    while (i != suspended.end() && i->second.getId() != id)
-        ++i;
-    if (i == suspended.end())
-        throw Exception(QPID_MSG("Session timed out or invalid ID: " << id));
-    return i->second;
+    Mutex::ScopedLock l(lock);
+    std::auto_ptr<SessionState> session(new SessionState(*this, h, timeout_));
+    active.insert(session->getId());
+    return session;
 }
 
-}} // namespace qpid::broker
+void  SessionManager::suspend(std::auto_ptr<SessionState> session) {
+    Mutex::ScopedLock l(lock);
+    session->expiry = AbsTime(now(),session->getTimeout());
+    suspended.push_back(session.release()); // In expiry order
+    eraseExpired();
+}
 
+std::auto_ptr<SessionState>  SessionManager::resume(const Uuid& id) {
+    Mutex::ScopedLock l(lock);
+    eraseExpired();
+    if (active.find(id) != active.end()) 
+        throw SessionBusyException(
+            QPID_MSG("Session already active: " << id));
+    Suspended::iterator i = std::find_if(
+        suspended.begin(), suspended.end(),
+        boost::bind(std::equal_to<Uuid>(), id, boost::bind(&SessionState::getId,
_1))
+    );
+    if (i == suspended.end())
+        throw InvalidArgumentException(
+            QPID_MSG("No suspended session with id=" << id));
+    active.insert(id);
+    return make_auto_ptr(suspended.release(i).release());
+}
 
+void SessionManager::eraseExpired() {
+    // Called with lock held.
+    Suspended::iterator i = std::lower_bound(
+        suspended.begin(), suspended.end(), now(), 
+        boost::bind(std::less<AbsTime>(), boost::bind(&SessionState::expiry, _1),
_2));
+    suspended.erase(suspended.begin(), i);
+}
 
+}} // namespace qpid::broker

Copied: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h (from r578221, incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.h)
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h?p2=incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h&p1=incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.h&r1=578221&r2=578975&rev=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SuspendedSessions.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h Mon Sep 24 14:15:46 2007
@@ -1,5 +1,5 @@
-#ifndef QPID_BROKER_SUSPENDEDSESSIONS_H
-#define QPID_BROKER_SUSPENDEDSESSIONS_H
+#ifndef QPID_BROKER_SESSIONMANAGER_H
+#define QPID_BROKER_SESSIONMANAGER_H
 
 /*
  *
@@ -22,40 +22,62 @@
  *
  */
 
-#include "qpid/broker/SessionState.h"
-#include "qpid/sys/Time.h"
-#include "qpid/sys/Mutex.h"
-
-#include <map>
+#include <qpid/framing/Uuid.h>
+#include <qpid/sys/Time.h>
+#include <qpid/sys/Mutex.h>
+
+#include <boost/noncopyable.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
+
+#include <set>
+#include <vector>
+#include <memory>
 
 namespace qpid {
 namespace broker {
 
+class SessionState;
+class SessionHandler;
+
 /**
- * Thread safe collection of suspended sessions.
- * Every session is owned either by a connection's SessionHandler
- * or by the SuspendedSessions.
+ * Create and manage SessionState objects.
  */
-class SuspendedSessions {
-    typedef std::multimap<sys::AbsTime,SessionState> Map;
-
-    sys::Mutex lock;
-    Map suspended;
-        
+class SessionManager : private boost::noncopyable {
   public:
-    /** Suspend a session, start it's timeout counter.*/
-    void suspend(SessionState& session);
+    SessionManager();
+    ~SessionManager();
+    /** Open a new active session, caller takes ownership */
+    std::auto_ptr<SessionState> open(
+        SessionHandler& h, uint32_t timeout_);
+    
+    /** Suspend a session, start it's timeout counter.
+     * The factory takes ownership.
+     */
+    void suspend(std::auto_ptr<SessionState> session);
         
     /** Resume a suspended session.
      *@throw Exception if timed out or non-existant.
      */
-    SessionState resume(const framing::Uuid& id);
+    std::auto_ptr<SessionState> resume(const framing::Uuid& id);
+
+  private:
+    typedef boost::ptr_vector<SessionState> Suspended;
+    typedef std::set<framing::Uuid> Active;
+
+    sys::Mutex lock;
+    Suspended suspended;
+    Active active;
+
+    void eraseExpired();             
+  friend class SessionState; // removes deleted sessions from active set. 
 };
-    
+
 
 
 }} // namespace qpid::broker
 
 
 
-#endif  /*!QPID_BROKER_SUSPENDEDSESSIONS_H*/
+
+
+#endif  /*!QPID_BROKER_SESSIONMANAGER_H*/

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Mon Sep 24 14:15:46 2007
@@ -19,18 +19,20 @@
  *
  */
 #include "SessionState.h"
+#include "SessionManager.h"
 #include "SessionHandler.h"
 #include "Connection.h"
 #include "Broker.h"
 #include "SemanticHandler.h"
+#include "qpid/framing/reply_exceptions.h"
 
 namespace qpid {
 namespace broker {
 
 using namespace framing;
 
-SessionState::SessionState(SessionHandler& h, uint32_t timeout_) 
-    : handler(&h), id(true), timeout(timeout_),
+SessionState::SessionState(SessionManager& f, SessionHandler& h, uint32_t timeout_)

+    : factory(f), handler(&h), id(true), timeout(timeout_),
       broker(h.getConnection().broker),
       version(h.getConnection().getVersion())
 {
@@ -45,6 +47,11 @@
     broker.update(handler->getChannel(), *this);       
 }
 
+SessionState::~SessionState() {
+    // Remove ID from active session list.
+    factory.active.erase(getId());
+}
+
 SessionHandler& SessionState::getHandler() {
     assert(isAttached());
     return *handler;
@@ -53,9 +60,7 @@
 AMQP_ClientProxy& SessionState::getProxy() {
     return getHandler().getProxy();
 }
-    /** Convenience for: getHandler()->getConnection()
-     *@pre getHandler() != 0
-     */
+
 Connection& SessionState::getConnection() {
     return getHandler().getConnection();
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h Mon Sep 24 14:15:46 2007
@@ -25,10 +25,13 @@
 #include "qpid/framing/Uuid.h"
 #include "qpid/framing/FrameHandler.h"
 #include "qpid/framing/ProtocolVersion.h"
+#include "qpid/sys/Time.h"
 
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <boost/noncopyable.hpp>
 
+#include <set>
+#include <vector>
 
 namespace qpid {
 
@@ -39,6 +42,7 @@
 namespace broker {
 
 class SessionHandler;
+class SessionManager;
 class Broker;
 class Connection;
 
@@ -59,9 +63,7 @@
                      private boost::noncopyable
 {
   public:
-    /** SessionState for a newly opened connection. */
-    SessionState(SessionHandler& h, uint32_t timeout_);
-
+    ~SessionState();
     bool isAttached() { return handler; }
 
     /** @pre isAttached() */
@@ -77,19 +79,21 @@
     uint32_t getTimeout() const { return timeout; }
     Broker& getBroker() { return broker; }
     framing::ProtocolVersion getVersion() const { return version; }
-    
 
   private:
-  friend class SessionHandler;  // Only SessionHandler can attach/detach
-    void detach() { handler=0; }
-    void attach(SessionHandler& h) { handler = &h; }
+    /** Only SessionManager can open sessions */
+    SessionState(SessionManager& f, SessionHandler& h, uint32_t timeout_);
 
+    SessionManager& factory;
     SessionHandler* handler;    
     framing::Uuid id;
     uint32_t timeout;
+    sys::AbsTime expiry;        // Used by SessionManager.
     Broker& broker;
     boost::ptr_vector<framing::FrameHandler> chain;
     framing::ProtocolVersion version;
+
+  friend class SessionManager;
 };
 
 }} // namespace qpid::broker

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp-default
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp-default?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp-default (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp-default Mon Sep 24 14:15:46 2007
@@ -42,4 +42,22 @@
    fun:pthread_create@GLIBC_2.0
    fun:_ZN4qpid3sys16AsynchIOAcceptor3runEPNS0_29ConnectionInputHandlerFactoryE
 }
+ 
+{
+   Bogus error appearing on Fedora 7.
+   Memcheck:Cond
+   fun:_dl_relocate_object
+   fun:dl_main
+   fun:_dl_sysdep_start
+   fun:_dl_start
+   obj:/lib/ld-2.6.so
+}
 
+{
+   Bogus error appearing on Fedora 7.
+   Memcheck:Cond
+   fun:_dl_relocate_object
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+}

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp Mon Sep 24 14:15:46 2007
@@ -137,6 +137,9 @@
         listener.messages.pop_front();
 
     }
+
+    void testSuspendResume() {
+    }
 };
 
 // Make this test suite a plugin.

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/run_test
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/run_test?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/run_test (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/run_test Mon Sep 24 14:15:46 2007
@@ -36,6 +36,7 @@
     test -n "$VALGRIND" && vg_check
 else
     # This is a non-libtool shell script, just execute it.
+    export VALGRIND srcdir
     exec "$@"
 fi
 

Modified: incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml?rev=578975&r1=578974&r2=578975&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml (original)
+++ incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml Mon Sep 24 14:15:46 2007
@@ -231,6 +231,12 @@
     </doc>
   </constant>
 
+  <constant name="session-busy" value="407" class="soft-error">
+    <doc>
+      A session.resume was attempted for a session already attached to another channel.
+    </doc>
+  </constant>
+
   <constant name="frame-error" value="501" class="hard-error">
     <doc>
       The client sent a malformed frame that the server could not decode. This strongly implies
a
@@ -291,6 +297,12 @@
   <constant name="invalid-argument" value="542" class="hard-error">
     <doc>
       An invalid or illegal argument was passed to a method, and the operation could not
proceed.
+    </doc>
+  </constant>
+
+  <constant name="channel-busy" value="543" class="hard-error">
+    <doc>
+      A session.open was sent on a channel that was already attached to a session.
     </doc>
   </constant>
 



Mime
View raw message