Hi To my knowledge, this is not implemented / supported currently in Camel 1.x
We have on the roadmap for Camel 2.x to allow dynamic changes to the routes using JMX and hence using an API. What you can do is to create a new camel context, you can have as many as you want. The old ones can be stopped if not being used anymore. Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: zuokun [mailto:[EMAIL PROTECTED] Sent: 20. oktober 2008 21:16 To: [email protected] Subject: How to programatically add/remove camel route Suppose I can get the camelContext injected by CamelContextAware interface, below is my code //add all camel routes defined in package org.mypackage, this seems to be working RouteBuilderFinder rbf = new RouteBuilderFinder((SpringCamelContext) camelContext, new String[]{"org.mypackage" }, this.getClass().getClassLoader(), null); List<RouteBuilder> builders = new ArrayList<RouteBuilder>(); rbf.appendBuilders(builders); for(RouteBuilder rb : builders) { camelContext.addRoutes(rb); } //remove all camel routes, this is NOT the right way, could someone show me an example camelContext.getRoutes().clear(); Could someone shed some light, thanks! -- View this message in context: http://www.nabble.com/How-to-programatically-add-remove-camel-route-tp20076542s22882p20076542.html Sent from the Camel - Users mailing list archive at Nabble.com.
