camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pontus Ullgren <ullg...@gmail.com>
Subject Re: Howto add routes to CamelContext on the fly.
Date Tue, 31 Jul 2012 19:12:56 GMT
Hello,

Provided that you add/remove the routes in a processor you can simply
get the current camel context from the Exchange[1].

If you need the camel context in another bean you can use dependency
injection when you create that bean.

[1] http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html

Best regards
Pontus Ullgren

On Tue, Jul 31, 2012 at 7:22 PM, bbuzzard
<Billy.Buzzard@bnsflogistics.com> wrote:
> I'm creating a java class that I want to add the the ActiveMQ-Camel libs that
> will periodically query a database for routes and add or remove them from
> the active camel context.  The camel.xml file contains some default routes
> that I use all the time, but I will like to add new routes to the same
> context.  Does anyone know how to get the active camel context?  If yes,
> how?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Howto-add-routes-to-CamelContext-on-the-fly-tp5716636.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message