diff options
author | Ted Ross <tross@apache.org> | 2008-06-03 15:53:48 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2008-06-03 15:53:48 +0000 |
commit | c0688ca6dede00e51ab4c691b96f8b1a2ad338e3 (patch) | |
tree | c1aad9dbd2752de8810dc5d6f11a41519ec944f4 /qpid/cpp | |
parent | d3f6382a66d8fc169a647abbf6a9c6c48622fb8f (diff) | |
download | qpid-python-c0688ca6dede00e51ab4c691b96f8b1a2ad338e3.tar.gz |
Management fixes: set session.detachedLifetime to 0, set journal->queue link in all cases
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@662830 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.cpp | 12 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/SessionState.cpp | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index 0b26762697..1eeb1fb7f8 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -578,11 +578,17 @@ uint64_t Queue::getPersistenceId() const } void Queue::setPersistenceId(uint64_t _persistenceId) const -{ - if (mgmtObject != 0 && persistenceId == 0) +{ + if (mgmtObject.get() != 0 && persistenceId == 0) { ManagementAgent::shared_ptr agent = ManagementAgent::getAgent (); agent->addObject (mgmtObject, _persistenceId, 3); + + if (externalQueueStore) { + ManagementObject::shared_ptr childObj = externalQueueStore->GetManagementObject(); + if (childObj.get() != 0) + childObj->setReference(mgmtObject->getObjectId()); + } } persistenceId = _persistenceId; } @@ -669,7 +675,7 @@ void Queue::setExternalQueueStore(ExternalQueueStore* inst) { if (inst) { ManagementObject::shared_ptr childObj = inst->GetManagementObject(); - if (childObj.get() != 0) + if (childObj.get() != 0 && mgmtObject.get() != 0) childObj->setReference(mgmtObject->getObjectId()); } } diff --git a/qpid/cpp/src/qpid/broker/SessionState.cpp b/qpid/cpp/src/qpid/broker/SessionState.cpp index 1ddb3f3026..dada7567f9 100644 --- a/qpid/cpp/src/qpid/broker/SessionState.cpp +++ b/qpid/cpp/src/qpid/broker/SessionState.cpp @@ -62,6 +62,7 @@ SessionState::SessionState( mgmtObject = management::Session::shared_ptr (new management::Session (this, parent, getId().getName())); mgmtObject->set_attached (0); + mgmtObject->set_detachedLifespan (0); agent->addObject (mgmtObject); } } |