Author: kwall
Date: Thu May 29 11:57:43 2014
New Revision: 1598260

URL: http://svn.apache.org/r1598260
Log:
QPID-5782: [Java Broker] Prevent VH housekeeper trying to check the state of 
queues that are not active

Modified:
    
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java

Modified: 
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java?rev=1598260&r1=1598259&r2=1598260&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
 (original)
+++ 
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
 Thu May 29 11:57:43 2014
@@ -915,19 +915,23 @@ public abstract class AbstractVirtualHos
         {
             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())



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to