diff options
| author | Gordon Sim <gsim@apache.org> | 2011-03-01 11:14:10 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2011-03-01 11:14:10 +0000 |
| commit | d67b9f0ea39e56c224da39042b0fc35d29c2d679 (patch) | |
| tree | f28ace23e3582b2c10f99d44dc40479ade9e50ce /qpid/cpp/src | |
| parent | eacde548cd9731f27d9beb6c3ee95d839ad77d12 (diff) | |
| download | qpid-python-d67b9f0ea39e56c224da39042b0fc35d29c2d679.tar.gz | |
QPID-2630: ensure that exclusive, auto-deleted queues are freed up on early deletion (remove some confusion between connection and session scope for these)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1075777 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Connection.cpp | 8 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/ConnectionState.h | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/SessionAdapter.cpp | 8 |
3 files changed, 4 insertions, 13 deletions
diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp index f138a2d55e..9648ffd687 100644 --- a/qpid/cpp/src/qpid/broker/Connection.cpp +++ b/qpid/cpp/src/qpid/broker/Connection.cpp @@ -331,14 +331,6 @@ void Connection::closed(){ // Physically closed, suspend open sessions. try { while (!channels.empty()) ptr_map_ptr(channels.begin())->handleDetach(); - while (!exclusiveQueues.empty()) { - boost::shared_ptr<Queue> q(exclusiveQueues.front()); - q->releaseExclusiveOwnership(); - if (q->canAutoDelete()) { - Queue::tryAutoDelete(broker, q); - } - exclusiveQueues.erase(exclusiveQueues.begin()); - } } catch(std::exception& e) { QPID_LOG(error, QPID_MSG("While closing connection: " << e.what())); assert(0); diff --git a/qpid/cpp/src/qpid/broker/ConnectionState.h b/qpid/cpp/src/qpid/broker/ConnectionState.h index 774c37408d..9c31a931d8 100644 --- a/qpid/cpp/src/qpid/broker/ConnectionState.h +++ b/qpid/cpp/src/qpid/broker/ConnectionState.h @@ -79,7 +79,6 @@ class ConnectionState : public ConnectionToken, public management::Manageable Broker& getBroker() { return broker; } Broker& broker; - std::vector<boost::shared_ptr<Queue> > exclusiveQueues; //contained output tasks sys::AggregateOutput outputTasks; diff --git a/qpid/cpp/src/qpid/broker/SessionAdapter.cpp b/qpid/cpp/src/qpid/broker/SessionAdapter.cpp index 68aa26b270..63c4b660b2 100644 --- a/qpid/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/qpid/cpp/src/qpid/broker/SessionAdapter.cpp @@ -353,12 +353,12 @@ void SessionAdapter::QueueHandlerImpl::checkDelete(Queue::shared_ptr queue, bool } else if(ifUnused && queue->getConsumerCount() > 0) { throw PreconditionFailedException(QPID_MSG("Cannot delete queue " << queue->getName() << "; queue in use")); - } else if (queue->isExclusiveOwner(&getConnection())) { + } else if (queue->isExclusiveOwner(&session)) { //remove the queue from the list of exclusive queues if necessary - QueueVector::iterator i = std::find(getConnection().exclusiveQueues.begin(), - getConnection().exclusiveQueues.end(), + QueueVector::iterator i = std::find(exclusiveQueues.begin(), + exclusiveQueues.end(), queue); - if (i < getConnection().exclusiveQueues.end()) getConnection().exclusiveQueues.erase(i); + if (i < exclusiveQueues.end()) exclusiveQueues.erase(i); } } |
