camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Add RoutePolicy to multiple routes
Date Wed, 12 Feb 2014 09:54:02 GMT
You can try with a custom lifecycle strategy and its callbacks such as
onRoutesAdd
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/LifecycleStrategy.html

On Wed, Feb 12, 2014 at 10:23 AM, edhansen42 <edha@vsp.com> wrote:
> Wanted to clarify a bit.
> I created a class that implemented CamelContextAware and contained a
> @PostConstruct init() method.  This was called after all the routes had been
> added to the context, and I was able to access the routes and add my custom
> RoutePolicy to them, but the policy on each route did not seem take effect.
> So I assumed that the policy had to be added to the route before the
> CamelContext was started.
> I have a class that extends CamelConfiguration and was hoping overriding the
> routes() method would do the trick, but all the routes aren't available at
> that point.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Add-RoutePolicy-to-multiple-routes-tp5747167p5747169.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Mime
View raw message