From 7a11e69aa1a86660b9cd4df58fe54bdce7dae089 Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Sun, 25 Jan 2009 00:41:29 +0000 Subject: QPID-1611 patch from mick git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@737460 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Queue.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/broker/Queue.cpp') diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index d459c64c54..f3cdc03f7d 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -705,7 +705,7 @@ void Queue::create(const FieldTable& _settings) configure(_settings); } -void Queue::configure(const FieldTable& _settings) +void Queue::configure(const FieldTable& _settings, bool recovering) { setPolicy(QueuePolicy::createQueuePolicy(_settings)); //set this regardless of owner to allow use of no-local with exclusive consumers also @@ -736,6 +736,9 @@ void Queue::configure(const FieldTable& _settings) if (mgmtObject != 0) mgmtObject->set_arguments (_settings); + + if ( isDurable() && ! getPersistenceId() && ! recovering ) + store->create(*this, _settings); } void Queue::destroy() @@ -815,16 +818,17 @@ uint32_t Queue::encodedSize() const + (policy.get() ? (*policy).encodedSize() : 0); } -Queue::shared_ptr Queue::decode(QueueRegistry& queues, Buffer& buffer) +Queue::shared_ptr Queue::decode ( QueueRegistry& queues, Buffer& buffer, bool recovering ) { string name; buffer.getShortString(name); std::pair result = queues.declare(name, true); buffer.get(result.first->settings); - result.first->configure(result.first->settings); + result.first->configure(result.first->settings, recovering ); if (result.first->policy.get() && buffer.available() >= result.first->policy->encodedSize()) { buffer.get ( *(result.first->policy) ); } + return result.first; } -- cgit v1.2.1