Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 900B893B0 for ; Fri, 18 Nov 2011 23:53:16 +0000 (UTC) Received: (qmail 36082 invoked by uid 500); 18 Nov 2011 23:53:16 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 36058 invoked by uid 500); 18 Nov 2011 23:53:16 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 36051 invoked by uid 99); 18 Nov 2011 23:53:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2011 23:53:16 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2011 23:53:15 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 574298E6D4 for ; Fri, 18 Nov 2011 23:52:55 +0000 (UTC) Date: Fri, 18 Nov 2011 23:52:55 +0000 (UTC) From: "Bilgin Ibryam (Updated) (JIRA)" To: issues@camel.apache.org Message-ID: <931999758.45534.1321660375359.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <381725157.45514.1321660251530.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAMEL-4696) When a route is removed from camel, LifecycleStrategy is called twice MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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