On Fri, Mar 11, 2011 at 4:44 PM, kanmisc <[email protected]> wrote: > Hi All > > I have a requirement of monitoring my system and it is implemented with the > help of camel sending messages often to different ports and checks for > system status. When i developed, i used mvn camel:run command and executed > the camel routes to send messages. > > But now i have to automate it by executing this camel functionality from > unix cron. For this i have written a junit test which is called from cron > and it triggers the camel to send messages every hour. it starts and sends > messages fine but I am not able to shutdown the camel completely. I tried > shutdown strategy but it is not getting shut down. >
You should aim for any server or application etc. being able to shutdown reliably. So you should maybe take a bit time to investigate why it may not shutdown properly. Most often its sufficient to invoke the stop method on the CamelContext to initiate a shutdown. You can read more here http://camel.apache.org/graceful-shutdown.html Also chapter 13 in the Camel in Action book coves reliable startup and shutdown of Camel. > Please provide suggestions - > 1) Is it ok to call camel like this from a test class? Or is it possible to > execute camel from unix cron directly? > 2) How to shutdown the camel (i.e until next triggering of messages so that > no resource consumption) > > Thanks in advance. > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Shutting-down-camel-from-a-test-tp3425270p3425270.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
