This content has been marked as final.
Show 2 replies
-
1. Re: activemq shutdownHook
garytully Jul 18, 2011 9:06 AM (in response to heatlamp)When useShutdownHook=true, the broker registers a shutdown hook with the jvm
Runtime.getRuntime().addShutdownHook
from which it calls broker.stop(). If the jvm is shutdown before the broker is stopped, then it will do a clean shutdown as part of the jvm callback. It is always better to do a clean stop of the broker because it will ensure a speedy restart as all in-memory data will have been checkpointed.
If an application or container wants to manage broker shutdown via a shutdown hook, such that it can control the shutdown order of components, it should disable the broker hook, which defaults to true.
-