Thanks Dejan. So just to clarify:
private BrokerService service =
BrokerFactory.createBroker("xbean:activemq.xml");
public void init(ServletConfig config) throws ServletException {
service = BrokerFactory.createBroker("xbean:activemq.xml");
service.start();
service.waitUntilStarted();
}
public void destroy() {
service.stop();
service.waitUntilStopped();
service = null;
}
Might be worth setting to null in destroy() just in case the finalization or
garbage collection of the servlet isn't prompt.
Cheers
Nick
--
View this message in context:
http://activemq.2283324.n4.nabble.com/Stopping-an-embedded-Broker-due-to-webapp-reload-tp3785326p3790341.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.