Hi I'm running Camel 2.2.0 I've got my application running and im trying to
dynamically remove a route, i have exposed the below method via JMX

public void removeRoute(String name) throws Exception {
        if (springCamelContext.getRouteDefinition(name) != null) {
            springCamelContext.stopRoute(name);
            logger.info("route "+name +"removed
"+springCamelContext.removeRouteDefinition(name));
        }
        else{
            logger.error("trying to remove route that doesn't exist");
        }
}

The method looks like it worked the route has stopped and if i run this
method again with the same name
i get the logged error "trying to remove route that doesn't exist" which i
expect.

But when i use JConsole i can still see my route and also i can click and
start it again. Is is normal ?

Cheers
kumaap0


-- 
View this message in context: 
http://old.nabble.com/Dynamically-removing-routes-tp28548051p28548051.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to