Return-Path: Delivered-To: apmail-incubator-felix-commits-archive@www.apache.org Received: (qmail 27908 invoked from network); 31 Oct 2006 19:39:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Oct 2006 19:39:30 -0000 Received: (qmail 66922 invoked by uid 500); 31 Oct 2006 19:39:41 -0000 Delivered-To: apmail-incubator-felix-commits-archive@incubator.apache.org Received: (qmail 66902 invoked by uid 500); 31 Oct 2006 19:39:41 -0000 Mailing-List: contact felix-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: felix-dev@incubator.apache.org Delivered-To: mailing list felix-commits@incubator.apache.org Received: (qmail 66891 invoked by uid 99); 31 Oct 2006 19:39:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Oct 2006 11:39:41 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Oct 2006 11:39:27 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 554E11A984D; Tue, 31 Oct 2006 11:39:04 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r469621 - in /incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework: Felix.java StartLevelImpl.java Date: Tue, 31 Oct 2006 19:39:04 -0000 To: felix-commits@incubator.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061031193904.554E11A984D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rickhall Date: Tue Oct 31 11:39:03 2006 New Revision: 469621 URL: http://svn.apache.org/viewvc?view=rev&rev=469621 Log: Applied patch (FELIX-168) for fine-grained spec compliance with start level service. Modified: incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/StartLevelImpl.java Modified: incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?view=diff&rev=469621&r1=469620&r2=469621 ============================================================================== --- incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original) +++ incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Tue Oct 31 11:39:03 2006 @@ -474,17 +474,19 @@ // Set the start level using the start level service; // this ensures that all start level requests are // serialized. - // NOTE: There is potentially a specification compliance - // issue here, since the start level request is asynchronous; - // this means that the framework will fire its STARTED event - // before all bundles have officially been restarted and it - // is not clear if this is really an issue or not. try { StartLevel sl = (StartLevel) getService( getBundle(0), getServiceReferences((BundleImpl) getBundle(0), StartLevel.class.getName(), null)[0]); - sl.setStartLevel(startLevel); + if (sl instanceof StartLevelImpl) + { + ((StartLevelImpl) sl).setStartLevelAndWait(startLevel); + } + else + { + sl.setStartLevel(startLevel); + } } catch (InvalidSyntaxException ex) { @@ -805,7 +807,10 @@ } } - fireFrameworkEvent(FrameworkEvent.STARTLEVEL_CHANGED, getBundle(0), null); + if (m_frameworkStatus == RUNNING_STATUS) + { + fireFrameworkEvent(FrameworkEvent.STARTLEVEL_CHANGED, getBundle(0), null); + } } /** Modified: incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/StartLevelImpl.java URL: http://svn.apache.org/viewvc/incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/StartLevelImpl.java?view=diff&rev=469621&r1=469620&r2=469621 ============================================================================== --- incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/StartLevelImpl.java (original) +++ incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/StartLevelImpl.java Tue Oct 31 11:39:03 2006 @@ -86,7 +86,8 @@ } /** - * This method is currently only called by the shutdown thread when the + * This method is currently only called by the by the thread that calls + * the Felix.start() method and the shutdown thread when the * framework is shutting down. * @param startlevel **/