camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bilgin Ibryam (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-4696) When a route is removed from camel, LifecycleStrategy is called twice
Date Fri, 18 Nov 2011 23:52:55 GMT

     [ 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

        

Mime
View raw message