Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A379AE798 for ; Wed, 6 Feb 2013 01:48:11 +0000 (UTC) Received: (qmail 22881 invoked by uid 500); 6 Feb 2013 01:48:11 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 22839 invoked by uid 500); 6 Feb 2013 01:48:11 -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 22827 invoked by uid 99); 6 Feb 2013 01:48:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 01:48:11 +0000 Date: Wed, 6 Feb 2013 01:48:11 +0000 (UTC) From: "Yasuhiro Kawame (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FELIX-3411) The implementation of org.osgi.service.startlevel.StartLevel#setStartLevel(int) does not follow the spec 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/FELIX-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572054#comment-13572054 ] Yasuhiro Kawame commented on FELIX-3411: ---------------------------------------- Thanks for update. I would like to you correct one point. When bundles that have a bundle start level equal to the previous active start level, I think their Bundle#start() is not called. --- src/main/java/org/apache/felix/framework/Felix.java +++ src/main/java/org/apache/felix/framework/Felix.java @@ -1267,7 +1267,8 @@ if (!isLowering && (((tuple.m_bundle.getPersistentState() == Bundle.ACTIVE) || (tuple.m_bundle.getPersistentState() == Bundle.STARTING)) - && (tuple.m_level == m_activeStartLevel))) + && (tuple.m_level == m_activeStartLevel) + && ((tuple.m_level >= low) && (tuple.m_level <= high)))) { try { @@ -1290,7 +1291,8 @@ else if (isLowering && (((tuple.m_bundle.getState() == Bundle.ACTIVE) || (tuple.m_bundle.getState() == Bundle.STARTING)) - && (tuple.m_level == m_activeStartLevel))) + && (tuple.m_level == m_activeStartLevel) + && ((tuple.m_level >= low) && (tuple.m_level <= high)))) { try { > The implementation of org.osgi.service.startlevel.StartLevel#setStartLevel(int) does not follow the spec > -------------------------------------------------------------------------------------------------------- > > Key: FELIX-3411 > URL: https://issues.apache.org/jira/browse/FELIX-3411 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: framework-4.0.2 > Reporter: Yasuhiro Kawame > Assignee: Richard S. Hall > Fix For: framework-4.2.0 > > > I think that the implementation of Changing the Active Start Level is different from Spec. > see: > OSGi Service Platform Core Specification Release 4, Version 4.3, Figure 8.2 page154 > Move to requested start level R, active level is A, B is a bundle's start level > Spec: > if (A < R) > while (A < R) { > A = A + 1 > Start All bundles where B = A > } > Implementation: > if (A < R) > Start All bundles where B <= R > A = R > Similarly, if A > R. > Javadoc: > http://www.osgi.org/javadoc/r4v43/org/osgi/service/startlevel/StartLevel.html#setStartLevel%28int%29 > http://www.osgi.org/javadoc/r4v43/org/osgi/framework/startlevel/FrameworkStartLevel.html#setStartLevel(int, org.osgi.framework.FrameworkListener...) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira