From e69fa09aae08f1ea7770793044d9b54cac4ac1a1 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Thu, 29 May 2014 11:57:43 +0000 Subject: QPID-5782: [Java Broker] Prevent VH housekeeper trying to check the state of queues that are not active git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1598260 13f79535-47bb-0310-9956-ffa450edef68 --- .../server/virtualhost/AbstractVirtualHost.java | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'qpid/java') diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java index 26da911e1f..0509985482 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java @@ -915,19 +915,23 @@ public abstract class AbstractVirtualHost> exte { for (AMQQueue q : getQueues()) { - if (_logger.isDebugEnabled()) - { - _logger.debug("Checking message status for queue: " - + q.getName()); - } - try + if (q.getState() == State.ACTIVE) { - q.checkMessageStatus(); - } catch (Exception e) - { - _logger.error("Exception in housekeeping for queue: " + q.getName(), e); - //Don't throw exceptions as this will stop the - // house keeping task from running. + if (_logger.isDebugEnabled()) + { + _logger.debug("Checking message status for queue: " + + q.getName()); + } + try + { + q.checkMessageStatus(); + } + catch (Exception e) + { + _logger.error("Exception in housekeeping for queue: " + q.getName(), e); + //Don't throw exceptions as this will stop the + // house keeping task from running. + } } } for (AMQConnectionModel connection : getConnectionRegistry().getConnections()) -- cgit v1.2.1