diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala index 4595a1b778..decc506210 100644 --- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala +++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala @@ -240,6 +240,17 @@ class ElectingLevelDBStore extends ProxyLevelDBStore { stopped_latch.countDown() func }) + master.blocking_executor.execute(^{ + val broker = brokerService + if( broker!=null ) { + try { + broker.requestRestart(); + broker.stop(); + } catch { + case e:Exception=> warn("Failure occurred while restarting the broker", e); + } + } + }) } def objectName = { diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala index 84f93d0e09..c1c4c0c211 100644 --- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala +++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala @@ -160,6 +160,7 @@ class MasterElector(store: ElectingLevelDBStore) extends ClusteredSingleton[Leve updating_store = true store.stop_master { elector.synchronized { + updating_store = false info("Master stopped") address = null changed