From a0c0de6f529e7ea92945a45f4e281f2f31e5b528 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Fri, 28 Feb 2014 14:40:23 +0000 Subject: QPID-5587: QMF to track queue owner (userId) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1572963 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Queue.cpp | 6 ++++++ cpp/src/qpid/broker/Queue.h | 2 +- cpp/src/qpid/broker/management-schema.xml | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index 2c8f8c2f0e..d8bc59eaf1 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -1660,6 +1660,12 @@ void Queue::setMgmtRedirectState( std::string peer, bool enabled, bool isSrc ) { } } +void Queue::setOwningUser(std::string& _userId) { + userId = _userId; + if (mgmtObject != 0) + mgmtObject->set_creator(userId); +} + bool Queue::reroute(boost::shared_ptr e, const Message& m) { if (e) { diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h index 6e7b17e1c5..21a8b7ef99 100644 --- a/cpp/src/qpid/broker/Queue.h +++ b/cpp/src/qpid/broker/Queue.h @@ -400,7 +400,7 @@ class Queue : public boost::enable_shared_from_this, QPID_BROKER_EXTERN bool find(framing::SequenceNumber pos, Message& msg ) const; // Remember the queue's owner so acl quotas can be restored after restart - void setOwningUser(std::string& _userId) { userId = _userId; } + void setOwningUser(std::string& _userId); void updateAclUserQueueCount(); QPID_BROKER_EXTERN void setAlternateExchange(boost::shared_ptr exchange); diff --git a/cpp/src/qpid/broker/management-schema.xml b/cpp/src/qpid/broker/management-schema.xml index bb15a244ba..2db8df4e85 100644 --- a/cpp/src/qpid/broker/management-schema.xml +++ b/cpp/src/qpid/broker/management-schema.xml @@ -282,8 +282,9 @@ - - + + + -- cgit v1.2.1