activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r812790 - /activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java
Date Wed, 09 Sep 2009 07:06:11 GMT
Author: rajdavies
Date: Wed Sep  9 07:06:11 2009
New Revision: 812790

URL: http://svn.apache.org/viewvc?rev=812790&view=rev
Log:
fix for https://issues.apache.org/activemq/browse/AMQ-1803

Modified:
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java?rev=812790&r1=812789&r2=812790&view=diff
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java
(original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java
Wed Sep  9 07:06:11 2009
@@ -25,6 +25,7 @@
 import org.apache.activemq.broker.jmx.BrokerViewMBean;
 import org.apache.activemq.broker.jmx.ManagedRegionBroker;
 import org.apache.activemq.broker.jmx.ManagementContext;
+import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.broker.region.Queue;
 import org.apache.activemq.command.ActiveMQDestination;
 
@@ -66,8 +67,11 @@
     public void purgeQueue(ActiveMQDestination destination) throws Exception {
         Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
         for (Iterator i = destinations.iterator(); i.hasNext();) {
-            Queue regionQueue = (Queue)i.next();
-            regionQueue.purge();
+            Destination dest = (Destination) i.next();
+            if (dest instanceof Queue) {
+                Queue regionQueue = (Queue) dest;
+                regionQueue.purge();
+            }
         }
     }
     



Mime
View raw message