Re: How to execute route on shutdown?

2012-10-19 Thread Claus Ibsen
On Thu, Oct 18, 2012 at 11:36 PM, Henrique Viecili henri...@myreks.com wrote: Claus and Willem, thank you for the insights... below I wrote about the solution I implemented, I appreciate if you could give your comments about it :) It should work, just the timers will fire before the routes is

Re: How to execute route on shutdown?

2012-10-18 Thread Henrique Viecili
Claus, what I am doing is a Dynamic Recipient List where I must register these 'services', when a service is started it sends its routing configuration to the DRL and when it's shut down it tells the DRL the service is offline. I believe the most appropriate is the shutdown from the CamelContext.

Re: How to execute route on shutdown?

2012-10-18 Thread Claus Ibsen
On Thu, Oct 18, 2012 at 3:35 PM, Henrique Viecili henri...@myreks.com wrote: Claus, what I am doing is a Dynamic Recipient List where I must register these 'services', when a service is started it sends its routing configuration to the DRL and when it's shut down it tells the DRL the service

Re: How to execute route on shutdown?

2012-10-18 Thread Henrique Viecili
Claus and Willem, thank you for the insights... below I wrote about the solution I implemented, I appreciate if you could give your comments about it :) On Thu, Oct 18, 2012 at 3:37 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Thu, Oct 18, 2012 at 3:35 PM, Henrique Viecili

Re: How to execute route on shutdown?

2012-10-17 Thread Henrique Viecili
Isn't it possible with Spring DSL? I thought the solution would be a no-brainer here in the list... Regards, *Henrique Viecili* On Mon, Oct 15, 2012 at 6:27 PM, Henrique Viecili henri...@myreks.comwrote: Hello guys... I've created a service that register itself on startup using camel-timer

Re: How to execute route on shutdown?

2012-10-17 Thread Willem jiang
I think the most convenient is define a ShutdownStrategy and configure it into you camel context with the Spring DSL. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com

Re: How to execute route on shutdown?

2012-10-17 Thread Claus Ibsen
On Mon, Oct 15, 2012 at 11:27 PM, Henrique Viecili henri...@myreks.com wrote: Hello guys... I've created a service that register itself on startup using camel-timer component and now I want to make it unregister itself on shutdown. I know I could do it registering a Shutdown Hook in the JVM

How to execute route on shutdown?

2012-10-15 Thread Henrique Viecili
Hello guys... I've created a service that register itself on startup using camel-timer component and now I want to make it unregister itself on shutdown. I know I could do it registering a Shutdown Hook in the JVM or coding my own ShutdownStrategy but I am looking for a simple solution preferably