Hope someone can help with this. I have an application with 1 route. When
autostart is set to false, in the camel context, and start my application
all does what I expect. 1 route that is not started. Then when I then start
the route the route is started. Which again is what I expect.
>From the application if I get the routes using camelContext.getRoutes() I
get 2 routes! If I call camelContext.getRouteDefinitions() I only get 1.
Looking at the source code of camel and debugging it looks like the method
addRouteCollection is called when my application is started and when I start
the routes. Looking at the code shown below it explains why I am getting 2
routes!!! Is this a bug???
synchronized void addRouteCollection(Collection<Route> routes) throws
Exception {
if (this.routes == null) {
this.routes = new LinkedHashSet<Route>();
}
if (routes != null) {
this.routes.addAll(routes);
}
}
I am running camel version 2.7.0
--
View this message in context:
http://camel.465427.n5.nabble.com/autostart-routes-not-working-correctly-tp5752196.html
Sent from the Camel - Users mailing list archive at Nabble.com.