activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r666607 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
Date Wed, 11 Jun 2008 10:36:26 GMT
Author: rajdavies
Date: Wed Jun 11 03:36:26 2008
New Revision: 666607

URL: http://svn.apache.org/viewvc?rev=666607&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1788

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java?rev=666607&r1=666606&r2=666607&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
Wed Jun 11 03:36:26 2008
@@ -311,13 +311,18 @@
         if (sub != null) {
 
             // remove the subscription from all the matching queues.
+            List<Destination> removeList = new ArrayList<Destination>();
             synchronized (destinationsMutex) {
                 for (Iterator iter = destinationMap.get(info.getDestination())
                         .iterator(); iter.hasNext();) {
                     Destination dest = (Destination) iter.next();
-                    dest.removeSubscription(context, sub);
+                    removeList.add(dest);
+                    
                 }
             }
+            for(Destination dest:removeList) {
+              dest.removeSubscription(context, sub);
+            }
 
             destroySubscription(sub);
         }



Mime
View raw message