activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r667756 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
Date Sat, 14 Jun 2008 08:34:15 GMT
Author: rajdavies
Date: Sat Jun 14 01:34:15 2008
New Revision: 667756

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

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java?rev=667756&r1=667755&r2=667756&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
Sat Jun 14 01:34:15 2008
@@ -22,8 +22,6 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.locks.Lock;
-
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.Message;
@@ -36,7 +34,6 @@
 import org.apache.activemq.kaha.StoreEntry;
 import org.apache.activemq.store.MessageRecoveryListener;
 import org.apache.activemq.store.TopicReferenceStore;
-import org.apache.activemq.util.SubscriptionKey;
 
 public class KahaTopicReferenceStore extends KahaReferenceStore implements TopicReferenceStore
{
 
@@ -143,10 +140,11 @@
                 ConsumerMessageRef ref = null;
                 if((ref = container.remove(messageId)) != null) {
                     StoreEntry entry = ref.getAckEntry();
+                    //ensure we get up to-date pointers
+                    entry = ackContainer.refresh(entry);
                     TopicSubAck tsa = ackContainer.get(entry);
                     if (tsa != null) {
                         if (tsa.decrementCount() <= 0) {
-                            entry = ackContainer.refresh(entry);
                             ackContainer.remove(entry);
                             ReferenceRecord rr = messageContainer.get(messageId);
                             if (rr != null) {



Mime
View raw message