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 | e69fa09aae08f1ea7770793044d9b54cac4ac1a1 (patch) | |
| tree | 5ef1cf2af31dcc1ddf9a523c7488105e671bd973 | |
| parent | 7c06267d61b45d9028d634130442ef910135b3f0 (diff) | |
| download | qpid-python-e69fa09aae08f1ea7770793044d9b54cac4ac1a1.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@1598260 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java | 28 |
1 files changed, 16 insertions, 12 deletions
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<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()) |
