activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r628778 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
Date Mon, 18 Feb 2008 15:13:15 GMT
Author: rajdavies
Date: Mon Feb 18 07:13:12 2008
New Revision: 628778

URL: http://svn.apache.org/viewvc?rev=628778&view=rev
Log:
When recovering durable subscriptions - ensure they are recovered only once

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java?rev=628778&r1=628777&r2=628778&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
Mon Feb 18 07:13:12 2008
@@ -19,6 +19,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
@@ -253,8 +254,8 @@
      */
    
     public void recoverState() throws IOException {
-        for (Iterator<SubscriptionInfo> i = durableSubscribers.iterator(); i.hasNext();)
{
-            SubscriptionInfo info = i.next();
+        Set<SubscriptionInfo> set = new HashSet<SubscriptionInfo>(this.durableSubscribers);
  
+        for (SubscriptionInfo info:set) {
             LOG.info("Recovering subscriber state for durable subscriber: " + info);
             TopicReferenceStore ts = createTopicReferenceStore((ActiveMQTopic)info.getDestination());
             ts.addSubsciption(info, false);



Mime
View raw message