You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cs...@apache.org on 2016/05/09 19:08:05 UTC
[2/2] activemq git commit:
https://issues.apache.org/jira/browse/AMQ-6285
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.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/7bdcca1b
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/7bdcca1b
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/7bdcca1b
Branch: refs/heads/master
Commit: 7bdcca1bdacec4955c55e8717ac8d61cc51b0c69
Parents: db3f8b3
Author: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Authored: Mon May 9 19:06:40 2016 +0000
Committer: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Committed: Mon May 9 19:06:40 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/7bdcca1b/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 f148971..ffa60ff 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
@@ -471,7 +471,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);