activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6285
Date Mon, 09 May 2016 19:10:54 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.13.x 6abf89f0a -> cd68c42b9


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

Properly nulling out the scheduler service in MessageDatabase after it
is shutdown on a store close so that if the store is restarted the
thread will properly restart.

(cherry picked from commit 7bdcca1bdacec4955c55e8717ac8d61cc51b0c69)


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

Branch: refs/heads/activemq-5.13.x
Commit: cd68c42b90892a62d050fad7e46dddd469051b38
Parents: 6abf89f
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Mon May 9 19:06:40 2016 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Mon May 9 19:10:24 2016 +0000

----------------------------------------------------------------------
 .../org/apache/activemq/store/kahadb/MessageDatabase.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/cd68c42b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
index d9223a8..d2bd8e3 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
@@ -469,7 +469,12 @@ public abstract class MessageDatabase extends ServiceSupport implements
BrokerSe
                 checkpointLock.writeLock().unlock();
             }
             journal.close();
-            ThreadPoolUtils.shutdownGraceful(scheduler, -1);
+            synchronized(schedulerLock) {
+                if (scheduler != null) {
+                    ThreadPoolUtils.shutdownGraceful(scheduler, -1);
+                    scheduler = null;
+                }
+            }
             // clear the cache and journalSize on shutdown of the store
             storeCache.clear();
             journalSize.set(0);


Mime
View raw message