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 7bdcca1bda)
This commit is contained in:
Christopher L. Shannon (cshannon) 2016-05-09 19:06:40 +00:00
parent 6abf89f0a5
commit cd68c42b90
1 changed files with 6 additions and 1 deletions

View File

@ -469,7 +469,12 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
checkpointLock.writeLock().unlock(); checkpointLock.writeLock().unlock();
} }
journal.close(); journal.close();
synchronized(schedulerLock) {
if (scheduler != null) {
ThreadPoolUtils.shutdownGraceful(scheduler, -1); ThreadPoolUtils.shutdownGraceful(scheduler, -1);
scheduler = null;
}
}
// clear the cache and journalSize on shutdown of the store // clear the cache and journalSize on shutdown of the store
storeCache.clear(); storeCache.clear();
journalSize.set(0); journalSize.set(0);