You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bilgin Ibryam (Updated) (JIRA)" <ji...@apache.org> on 2011/11/19 00:52:55 UTC

[jira] [Updated] (CAMEL-4696) When a route is removed from camel, LifecycleStrategy is called twice

     [ https://issues.apache.org/jira/browse/CAMEL-4696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bilgin Ibryam updated CAMEL-4696:
---------------------------------

    Attachment: unnamed.patch

Here is a unit test showing the bug
                
> When a route is removed from camel, LifecycleStrategy is called twice 
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-4696
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4696
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Bilgin Ibryam
>         Attachments: unnamed.patch
>
>
> DefaultCamelContext.removeRoute method has these lines among others
>  if (getRouteStatus(routeId).isStopped()) {
>     routeService.setRemovingRoutes(true);
>     shutdownRouteService(routeService);
>     removeRouteDefinition(routeId);
>     ServiceHelper.stopAndShutdownServices(routeService);
> I think the last line from this snippet is not needed, because the route should be already stopped in order to pass the IF statement and then it is shutdown through this call shutdownRouteService(routeService);
>  ServiceHelper.stopAndShutdownServices(routeService) tries to stops again the route if not stopped, but the worse is it shutdown the rout again.
> It seems to me like a bug, other thoughts?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira