camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zuokun <>
Subject How to programatically add/remove camel route
Date Mon, 20 Oct 2008 19:16:15 GMT

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
RouteBuilderFinder rbf = new RouteBuilderFinder((SpringCamelContext)
camelContext, new String[]{"org.mypackage" },
this.getClass().getClassLoader(), null);
List<RouteBuilder> builders = new ArrayList<RouteBuilder>();

for(RouteBuilder rb : builders) {

//remove all camel routes, this is NOT the right way, could someone show me
an example

Could someone shed some light, thanks!

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message