summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-10-15 09:52:16 +0000
committerGordon Sim <gsim@apache.org>2007-10-15 09:52:16 +0000
commit143e0b952e77e5a2d487ffd7cad0fc82bdeeb45c (patch)
treee1f4dab4ff80c582fad678ca08020f1cc657651d
parentd1fe45808c053e19b6112ee2b823710167f8e821 (diff)
downloadqpid-python-143e0b952e77e5a2d487ffd7cad0fc82bdeeb45c.tar.gz
Remove default queue concept which is no longer applicable in 0-10.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@584719 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/src/qpid/broker/BrokerAdapter.cpp1
-rw-r--r--cpp/src/qpid/broker/SemanticState.cpp8
-rw-r--r--cpp/src/qpid/broker/SemanticState.h5
-rw-r--r--python/tests_0-10/queue.py7
4 files changed, 5 insertions, 16 deletions
diff --git a/cpp/src/qpid/broker/BrokerAdapter.cpp b/cpp/src/qpid/broker/BrokerAdapter.cpp
index 820cc2f397..daa63f4b0c 100644
--- a/cpp/src/qpid/broker/BrokerAdapter.cpp
+++ b/cpp/src/qpid/broker/BrokerAdapter.cpp
@@ -185,7 +185,6 @@ void BrokerAdapter::QueueHandlerImpl::declare(uint16_t /*ticket*/, const string&
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();
diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp
index 09f5b8ce98..8afc2f0853 100644
--- a/cpp/src/qpid/broker/SemanticState.cpp
+++ b/cpp/src/qpid/broker/SemanticState.cpp
@@ -540,14 +540,10 @@ void SemanticState::ConsumerImpl::stop()
}
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));
diff --git a/cpp/src/qpid/broker/SemanticState.h b/cpp/src/qpid/broker/SemanticState.h
index ff1c8192f7..65e67283cc 100644
--- a/cpp/src/qpid/broker/SemanticState.h
+++ b/cpp/src/qpid/broker/SemanticState.h
@@ -137,15 +137,12 @@ class SemanticState : public framing::FrameHandler::Chains,
/**
* 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; }
diff --git a/python/tests_0-10/queue.py b/python/tests_0-10/queue.py
index d72d12f92d..7b3590d11b 100644
--- a/python/tests_0-10/queue.py
+++ b/python/tests_0-10/queue.py
@@ -126,11 +126,8 @@ class QueueTests(TestBase):
#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: