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 ffa60ff761..a3addccbb3 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 @@ -354,7 +354,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe return; } synchronized (schedulerLock) { - if (scheduler == null) { + if (scheduler == null || scheduler.isShutdown()) { scheduler = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() { @Override