camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbToe <>
Subject autostart routes not working correctly.
Date Thu, 12 Jun 2014 10:43:57 GMT
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) {

I am running camel version 2.7.0

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

View raw message