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

View File

@ -471,7 +471,12 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
checkpointLock.writeLock().unlock();
}
journal.close();
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);