Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 41870 invoked from network); 27 Sep 2007 07:18:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Sep 2007 07:18:12 -0000 Received: (qmail 17361 invoked by uid 500); 27 Sep 2007 07:18:01 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 17330 invoked by uid 500); 27 Sep 2007 07:18:01 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 17321 invoked by uid 99); 27 Sep 2007 07:18:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 00:18:01 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 07:18:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 96F077141ED for ; Thu, 27 Sep 2007 00:17:50 -0700 (PDT) Message-ID: <19150824.1190877470608.JavaMail.jira@brutus> Date: Thu, 27 Sep 2007 00:17:50 -0700 (PDT) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Subject: [jira] Updated: (FELIX-381) Started bundles may change state to RESOLVED In-Reply-To: <31930767.1190877350569.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger updated FELIX-381: ------------------------------------ Attachment: FELIX-381.patch Addition to moduleResolved method in the Felix class to ignore the event if the owning bundle is not in the INSTALLED state. > Started bundles may change state to RESOLVED > -------------------------------------------- > > Key: FELIX-381 > URL: https://issues.apache.org/jira/browse/FELIX-381 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: 1.0.0 > Reporter: Felix Meschberger > Attachments: FELIX-381.patch > > > In certain situations a bundle, which has already been started gets its state changed back to RESOLVED. > Consider the following situation: A thread T1 is starting a Bundle A while another thread T2 is starting a Bundle B depending on Bundle A. T2 resolves Bundle B and as T1 has not done it yet assumes to have to resolve Bundle A. Before T2 can resolve Bundle A, T1 resolves Bundle A itself and actually starts Bundle A at the end setting the state to ACTIVE. Then T2 finishes resolving and calls the ResolveListener to inform that Bundle A has been resolved, which causes the state of Bundle A to be set to RESOLVED. > The consequence is that Bundle A has been started - BundleActivator called, STARTED event fired - and then its state is just set to RESOLVED and a RESOLVED event is fired. This is incorrect as (1) Bundle A has already started and before entering the RESOLVED state (again) it would have to be stopped and (2) getting A back into resolved state would cause STOPPING and STOPPED events to be fired and not a RESOLVED event. > The fix would probably be to ignore the moduleResolved event for bundles, which are not in the INSTALLED state. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.