camel-users mailing list archives

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

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.


Best regards
Pontus Ullgren

On Tue, Jul 31, 2012 at 7:22 PM, bbuzzard
<> 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:
> Sent from the Camel - Users mailing list archive at

View raw message