If you want to cleanup and remove everything from a route you need to
stop it graceful, and then remove the route as well.
And if you have some endpoints that are not longer in use, then remove
them as well.



On Fri, May 3, 2013 at 12:30 PM, mdo <manfred.doh...@gmail.com> wrote:
> Thanks Claus, I can confirm that suspend-resume-cycles resolve my problem of
> leaked threads.
>
> I'm now doing a selective start:
>         if (!context.getRouteStatus(routeId).isStarted()) {
>             context.startRoute(routeId);
>         } else {
>             context.resumeRoute(routeId);
>         }
>
> ... and changed stopRoute() to suspendRoute():
>             //camelContext.stopRoute(routeId);
>             camelContext.suspendRoute(routeId);
>
> The docs regarding the lifecycle state:
> "End users is encouraged to use suspend/resume if you are temporary stopping
> a Camel application."
>
> But I'm quite unsure: am I not supposed to re-start a stopped route, do you
> consider the piling of threads a bug in Camel or a mis-usage?
>
> I don't have an URL at hand but I remember that I found advice to use a
> Quartz trigger to periodically start and stop a route on this list. Maybe
> you could point out the pitfalls in the wiki somewhat more emphasized? Seems
> a pretty usual use case to me.
>
> My intention in stopping the route was to completely clean up the
> environment (without removing the route definition itself). By now I see
> that a suspended FTP2/SFTP endpoint keeps the remote connection open. Will
> go and shut it down somehow else now ...
>
> Regards, mdo.
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/2-11-File2-Quartz-threads-leaking-tp5731922p5731963.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to