On Fri, Aug 24, 2012 at 2:11 PM, livensn <[email protected]> wrote:
> I edited my original post with my camel version : 2.10.0
>
> Here's the code of my route :
>
> public class ContactReportRoute extends RouteBuilder {
>     private static final Logger LOGGER =
> Logger.getLogger(ContactReportRoute.class);
>
>     @Override
>     public void configure() throws Exception {
>
>         LOGGER.info("Route started bro.");
>     }
> }
>
> So, I haven't done anything special. The route just gets started.
>

Its not the same.

Camel will always on startup read the route definitions. And that is
what you use the RouteBuilder classes for. To define routes.
So the configure() method will be executed on startup once.
Camel will then also validate the route definition if there is any
mistakes etc and report that. This ensures that on startup all the
routes are runnable.

Now whether the route is actually started or not, that's the
autoStartup option is for.

So that is why you see the LOGGER code being invoked above. But if you
add a route, eg like

from("timer:foo?period=5s").log("I am invoked");

Then that route is not started.

You can then manually start it from JMX etc.

>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/CamelContext-autoStartup-false-not-working-tp5717994p5718005.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to