Author: gsim
Date: Mon Oct 15 02:52:16 2007
New Revision: 584719

URL: http://svn.apache.org/viewvc?rev=584719&view=rev
Log:
Remove default queue concept which is no longer applicable in 0-10.


Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/BrokerAdapter.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h
    incubator/qpid/trunk/qpid/python/tests_0-10/queue.py

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/BrokerAdapter.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/BrokerAdapter.cpp?rev=584719&r1=584718&r2=584719&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/BrokerAdapter.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/BrokerAdapter.cpp Mon Oct 15 
02:52:16 2007
@@ -185,7 +185,6 @@
        queue = queue_created.first;
        assert(queue);
        if (queue_created.second) { // This is a new queue
-           state.setDefaultQueue(queue);
             if (alternate) {
                 queue->setAlternateExchange(alternate);
                 alternate->incAlternateUsers();

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=584719&r1=584718&r2=584719&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Mon Oct 15 
02:52:16 2007
@@ -540,14 +540,10 @@
 }
 
 Queue::shared_ptr SemanticState::getQueue(const string& name) const {
-    //Note: this can be removed soon as the default queue for sessions is 
scrapped in 0-10
     Queue::shared_ptr queue;
     if (name.empty()) {
-        queue = getDefaultQueue();
-        if (!queue)
-            throw NotAllowedException(QPID_MSG("No queue name specified."));
-    }
-    else {
+        throw NotAllowedException(QPID_MSG("No queue name specified."));
+    } else {
         queue = session.getBroker().getQueues().find(name);
         if (!queue)
             throw NotFoundException(QPID_MSG("Queue not found: "<<name));

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h?rev=584719&r1=584718&r2=584719&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h Mon Oct 15 
02:52:16 2007
@@ -137,15 +137,12 @@
     
     /**
      * Get named queue, never returns 0.
-     * @return: named queue or default queue for session if name=""
+     * @return: named queue
      * @exception: ChannelException if no queue of that name is found.
      * @exception: ConnectionException if name="" and session has no default.
      */
     Queue::shared_ptr getQueue(const std::string& name) const;
     
-
-    void setDefaultQueue(Queue::shared_ptr queue){ defaultQueue = queue; }
-    Queue::shared_ptr getDefaultQueue() const { return defaultQueue; }
     uint32_t setPrefetchSize(uint32_t size){ return prefetchSize = size; }
     uint16_t setPrefetchCount(uint16_t n){ return prefetchCount = n; }
 

Modified: incubator/qpid/trunk/qpid/python/tests_0-10/queue.py
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/queue.py?rev=584719&r1=584718&r2=584719&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/queue.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/queue.py Mon Oct 15 02:52:16 
2007
@@ -126,11 +126,8 @@
         #straightforward case, both exchange & queue exist so no errors 
expected:
         channel.queue_bind(queue="queue-1", exchange="amq.direct", 
routing_key="key1")
 
-        #bind the default queue for the channel (i.e. last one declared):
-        channel.queue_bind(exchange="amq.direct", routing_key="key2")
-
-        #use the queue name where neither routing key nor queue are specified:
-        channel.queue_bind(exchange="amq.direct")
+        #use the queue name where the routing key is not specified:
+        channel.queue_bind(queue="queue-1", exchange="amq.direct")
 
         #try and bind to non-existant exchange
         try:


Reply via email to