activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5762
Date Thu, 14 May 2015 20:57:31 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 181e4d461 -> c5a1b8606


https://issues.apache.org/jira/browse/AMQ-5762

Fix for potential memory leak from creation of KahaDBTopicMessageStore.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/c5a1b860
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/c5a1b860
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/c5a1b860

Branch: refs/heads/master
Commit: c5a1b86062d8cb46cffbd300916c55a1677778fb
Parents: 181e4d4
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu May 14 16:57:06 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu May 14 16:57:06 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/store/kahadb/KahaDBStore.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/c5a1b860/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
index 4438292..f6ef482 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
@@ -29,7 +29,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.LinkedBlockingQueue;
@@ -430,6 +429,7 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter
{
                     // sync add? (for async, future present from getFutureOrSequenceLong)
                     Object possibleFuture = message.getMessageId().getFutureOrSequenceLong();
 
+                    @Override
                     public void sequenceAssignedWithIndexLocked(final long sequence) {
                         message.getMessageId().setFutureOrSequenceLong(sequence);
                         if (indexListener != null) {
@@ -724,7 +724,9 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter
{
         public KahaDBTopicMessageStore(ActiveMQTopic destination) throws IOException {
             super(destination);
             this.subscriptionCount.set(getAllSubscriptions().length);
-            asyncTopicMaps.add(asyncTaskMap);
+            if (isConcurrentStoreAndDispatchTopics()) {
+                asyncTopicMaps.add(asyncTaskMap);
+            }
         }
 
         @Override


Mime
View raw message