On Tue, Oct 4, 2011 at 5:11 PM, Jeff Segal <jeffrey.se...@gmail.com> wrote:
> I have an application which dynamically creates and removes routes in
> a camel context. I'd like to be able to invoke an onShutdown method
> when routes are removed so that I can perform some cleanup tasks. I've
> read http://camel.apache.org/graceful-shutdown.html but wasn't able to
> find a good solution there. Ideally I'd define a Runnable and
> configure it like this:
>
> from("foo:bar").to("abc:123").onShutdown(myRunnable);
>
> Is there some alternative that I missed or is this more of a feature request?
>

There is no such thing in the DSL.

Would could possible look into adding support for callbacks on
RoutePolicy, as you
could then associate a route with a policy, and have callbacks for
onStart / onStop / onShutdown wtc.

Fell free to create a JIRA ticket.


> Thanks,
> Jeff
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to