First of all you are using a REALLY old version of Camel. So if it was a
bug it has probably been long since fixed. Then next question is what is
your route and how are you starting the context?

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Thu, Jun 12, 2014 at 5:43 AM, pbToe <pblake...@gmail.com> wrote:

> 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.
>

Reply via email to