camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Duplicate Camel routes
Date Tue, 24 Sep 2013 07:56:15 GMT
To add routes you can use the API on CamelContext as you do, eg addRoutes.

You should just reuse the same CamelContext instance so the routes is
running in the same camel container.

On Tue, Sep 24, 2013 at 9:40 AM, Gnanaguru S
<gnanaguru.sattanathan@wipro.com> wrote:
>
> Am sorry, Its my mistake. I am creating new camel context's every time,
> instead of adding routes to the existing Camel context.
>
> I am creating new default camel context every time:
>
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new FTPRouteBuilder(context, channelId, fromUri, toUri));
>
> Any advice for me to add routes to the existing context ? I am able to see
> some documentation on loading routes from XML file but not using API's.
>
> Thanks
> Guru
> gnanaguru.com
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Duplicate-Camel-routes-tp5740090p5740101.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message