Author: rajdavies
Date: Wed Dec 20 00:33:50 2006
New Revision: 488958

URL: http://svn.apache.org/viewvc?view=rev&rev=488958
Log:
stop destinations when stoping a region

Modified:
    
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java

Modified: 
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
URL: 
http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java?view=diff&rev=488958&r1=488957&r2=488958
==============================================================================
--- 
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
 (original)
+++ 
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
 Wed Dec 20 00:33:50 2006
@@ -79,6 +79,11 @@
     }
     
     public void stop() throws Exception {
+        for (Iterator i = destinations.values().iterator();i.hasNext();) {
+            Destination dest = (Destination)i.next();
+            dest.stop();
+        }
+        destinations.clear();
     }
     
     public Destination addDestination(ConnectionContext context, 
ActiveMQDestination destination) throws Exception {


Reply via email to