Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 51056 invoked from network); 3 Apr 2009 09:36:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2009 09:36:59 -0000 Received: (qmail 12775 invoked by uid 500); 3 Apr 2009 09:36:59 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 12733 invoked by uid 500); 3 Apr 2009 09:36:58 -0000 Mailing-List: contact dev-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 dev@camel.apache.org Received: (qmail 12723 invoked by uid 500); 3 Apr 2009 09:36:58 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 12720 invoked by uid 99); 3 Apr 2009 09:36:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 09:36:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 09:36:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A5C08234C003 for ; Fri, 3 Apr 2009 02:36:34 -0700 (PDT) Message-ID: <696501122.1238751394662.JavaMail.jira@brutus> Date: Fri, 3 Apr 2009 02:36:34 -0700 (PDT) From: "Willem Jiang (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-1515) Add isStratingFinished() method to the ServiceSupport class In-Reply-To: <609625749.1238751154657.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated CAMEL-1515: -------------------------------- Description: Just found the the isStarted() is used for starting the components in CamelContext when the CamelContext is starting, The change of isStarted() recently will broke below code. {code} public boolean isStarted() { return started.get()&&!starting.get(); } {code} {code} public Component getComponent(String name) { // synchronize the look up and auto create so that 2 threads can't // concurrently auto create the same component. synchronized (components) { Component component = components.get(name); if (component == null && autoCreateComponents) { try { component = getComponentResolver().resolveComponent(name, this); if (component != null) { addComponent(name, component); if (isStarted()) { // If the component is looked up after the context is started, // lets start it up. startServices(component); } } } catch (Exception e) { throw new RuntimeCamelException("Could not auto create component: " + name, e); } } return component; } } {code} so I want to add isStratingFinished() method to check if the starting process is finished. was: Just found the the isStarted() is used for starting the components in CamelContext, {code} public Component getComponent(String name) { // synchronize the look up and auto create so that 2 threads can't // concurrently auto create the same component. synchronized (components) { Component component = components.get(name); if (component == null && autoCreateComponents) { try { component = getComponentResolver().resolveComponent(name, this); if (component != null) { addComponent(name, component); if (isStarted()) { // If the component is looked up after the context is started, // lets start it up. startServices(component); } } } catch (Exception e) { throw new RuntimeCamelException("Could not auto create component: " + name, e); } } return component; } } {code} so I want to add isStratingFinished() method to check if the starting process is finished. > Add isStratingFinished() method to the ServiceSupport class > ----------------------------------------------------------- > > Key: CAMEL-1515 > URL: https://issues.apache.org/activemq/browse/CAMEL-1515 > Project: Apache Camel > Issue Type: Improvement > Reporter: Willem Jiang > Assignee: Willem Jiang > Fix For: 2.0.0, 1.6.1 > > > Just found the the isStarted() is used for starting the components in CamelContext when the CamelContext is starting, > The change of isStarted() recently will broke below code. > {code} > public boolean isStarted() { > return started.get()&&!starting.get(); > } > {code} > {code} > public Component getComponent(String name) { > // synchronize the look up and auto create so that 2 threads can't > // concurrently auto create the same component. > synchronized (components) { > Component component = components.get(name); > if (component == null && autoCreateComponents) { > try { > component = getComponentResolver().resolveComponent(name, this); > if (component != null) { > addComponent(name, component); > if (isStarted()) { > // If the component is looked up after the context is started, > // lets start it up. > startServices(component); > } > } > } catch (Exception e) { > throw new RuntimeCamelException("Could not auto create component: " + name, e); > } > } > return component; > } > } > {code} > so I want to add isStratingFinished() method to check if the starting process is finished. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.