Hi I would assume the AMQ is also shutting down the the applicationContext is closed, so Spring is shutting down and thus shuts down all the bean that is handling the lifecycle for.
If you run the camel-jms example in Camel then the AMQ broker is also stopping when you stop the example. We have lately patched the Main with a JVM shutdown hook so when you press CLTR + C to stop it then it will also call doStop() so its gracefully shutting down it all. Can you show the applicationContext and what you do to stop the Main? And which version of Camel and AMQ are you using? On Fri, Jan 16, 2009 at 10:00 AM, selezovikj <semir.elezo...@gmail.com> wrote: > > I am using org.apache.camel.spring.Main -ac file.xml to start up Camel. > In the xml file I have configuration for starting an ActiveMq broker on host > 61616, defined queues, and also beans responsible for handling messages > which are sent on the request/response queues. > > Now I want a way to gracefully shutdown the camel service. > I see that in the doStop() method of the Main class the > AbstractApplicationContext is closed. > When this is closed, the activeMq broker which we fired up is still running. > > Can someone please explain me what precisely is going on when the > applicationContext is closed ? > Also how to gracefully stop the instance of Main that fired up the activeMq > broker and that loads the xml configuration file ? > > Any help will be greatly appreciated > > > > > -- > View this message in context: > http://www.nabble.com/ApplicationContext-close-tp21495001s22882p21495001.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- ------- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/