Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 55600 invoked from network); 11 Jun 2008 10:36:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2008 10:36:47 -0000 Received: (qmail 29173 invoked by uid 500); 11 Jun 2008 10:36:50 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 29152 invoked by uid 500); 11 Jun 2008 10:36:49 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 29143 invoked by uid 99); 11 Jun 2008 10:36:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 03:36:49 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 10:36:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8063E23889C2; Wed, 11 Jun 2008 03:36:26 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: rajdavies@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080611103626.8063E23889C2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 removeList = new ArrayList(); 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); }