camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: How to programatically add/remove camel route
Date Tue, 21 Oct 2008 04:16:29 GMT

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
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: zuokun [] 
Sent: 20. oktober 2008 21:16
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
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