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 <[email protected]> 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.
