Hello, I'm looking to the ActiveMQ restart methodology... Currently I saw some JUnit tests in which restart are done but thanks new BrokerService instantiation. My aim is to restart the broker with the same instantiation. IE :
queuer = new BrokerService(); queuer.start(); queuer.stop(); queuer.start(); With the bellowed code I've this exception : 4064 [main] ERROR org.apache.activemq.broker.BrokerService - Failed to start ActiveMQ JMS Message Broker. Reason: org.apache.activemq.broker.BrokerStoppedException: Broker has been stopped: org.apache.activemq.broker.brokerservic...@9b42e6 I would like to understand why I can't restart a BrokerService with the same instantiation ? Anyway I try another code : queuer = new BrokerService(); queuer.start(); queuer.stop(); queuer.start(true); And then I've this exception : 2562 [main] ERROR org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter - Failed to get destinations java.io.IOException: Store has been closed. at org.apache.activemq.kaha.impl.KahaStore.initialize(KahaStore.java:460) Would like to know if it's a recommendation to follow to instanciate a new BrokerService before each restart or if my aim should work ? Thanks for all -- View this message in context: http://www.nabble.com/ActiveMQ-native-API-problem-%3A-BrokerService.stop---BrokerService.start%28true%29-tp23505596p23505596.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.