2 Replies Latest reply on Jul 18, 2011 10:23 AM by jim nash

    activemq shutdownHook

    jim nash Newbie

      Using Fuse 4.4 and Kahadb, I'm confused about the need for/exact function of the ActiveMQ 'shutdownHook': http://activemq.apache.org/broker-uri.html.  


      I assume this has something to do with container ActiveMQ lifecycle, but in what circumstances should this be set set true?


      Thanks, Jim

        • 1. Re: activemq shutdownHook
          garytully Novice

          When useShutdownHook=true, the broker registers a shutdown hook with the jvm


          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.