On Sun, Aug 26, 2012 at 10:09 PM, gilboy <[email protected]> wrote:
> Hi
>
> I have a standalone application which embeds Camel.
>
> Most of the development is complete at this point and I have started to
> think about how best to manage the starting and stopping of the application.
> The application will needs to be stopped and started each day. I need to use
> a scheduler tool(Autosys) to invoke a script to stop and start my
> application.
>
> I have taken a look at the *enableHangUpSupport *provided in the
> *org.apache.camel.spring.Main*.
>
> Providing the script to start my application will be easy. However, little
> confused on the best way to shut it down. As far as I can see I have 2
> options:
>
> (1) The script invokes a Java class which invokes a JMX call on an MBean I
> expose in my application which in turn invokes the stop method on
> org.apache.camel.spring.Main
>
> (2) Do a hard stop(kill -9) on the process ID for the JVM (my application
> runs on linux). Not sure if this will result in a graceful shutdown of the
> application?
>
> Any information on this area would be extremely appreciated
>

A trick is to use a file to tell the app to shutdown. As its easy for
any app to write a new file.
Then you can just keep an eye on a dir if a file is written, and then
react accordingly.

If you use Camel to scan for the file, then mind this FAQ
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html

> Thanks
> Joe
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Shutting-down-my-Camel-Application-tp5718097.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to