Hi,

I have a program which creates Camel routes dynamically based on one or more
route xml files in a folder. You can also specify a context, which then will
lead to the route created in that specified camel context.

Basically this:
    CamelContext camelContext = new SpringCamelContext(applicationContext);
    camelContext.addRoutes(theNewRouteBuilder);
    ((SpringCamelContext) camelContext).setName(theContextName);
    // add same components to this new context that were also present in
default camel context
    camelContext.start();

When the route xml file is removed, i do a camelContext.stopRoute(routeId)
and a camelContext.removeRoute(routeId). If it was the last route in the
camel context i also do
a camelContext.stop().

The problem is: sometimes when i remove a route xml and the re-add it, it is
not created / visible in the cli / hawtio. I guess i'm missing something.
*So my question is: are there any recommended practices for dynamically
creating and removing camel routes and or camel contexts.*

Regards
Rino





--
View this message in context: 
http://camel.465427.n5.nabble.com/Recommended-practices-for-dynamically-creating-and-removing-camel-routes-and-camel-contexts-tp5771978.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to