diff options
author | Keith Wall <kwall@apache.org> | 2014-05-29 11:57:43 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2014-05-29 11:57:43 +0000 |
commit | a664572a6551d9fcb26b5546cc2d504f602e7ee5 (patch) | |
tree | dbe766178fd30f656d99c527d71c5cc5489ed0e8 /java/broker-core/src | |
parent | 97002e2ac62ffab927cfec8fad4aa097d8e14479 (diff) | |
download | qpid-python-a664572a6551d9fcb26b5546cc2d504f602e7ee5.tar.gz |
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/qpid@1598260 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker-core/src')
-rw-r--r-- | java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java b/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java index 26da911e1f..0509985482 100644 --- a/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java +++ b/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java @@ -915,19 +915,23 @@ public abstract class AbstractVirtualHost<X extends AbstractVirtualHost<X>> 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()) |