Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 10313 invoked from network); 28 Jul 2009 07:20:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Jul 2009 07:20:31 -0000 Received: (qmail 32842 invoked by uid 500); 28 Jul 2009 07:21:48 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 32761 invoked by uid 500); 28 Jul 2009 07:21:47 -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 32751 invoked by uid 99); 28 Jul 2009 07:21:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2009 07:21:47 +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; Tue, 28 Jul 2009 07:21:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D8BF7234C044 for ; Tue, 28 Jul 2009 00:21:14 -0700 (PDT) Message-ID: <1565204078.1248765674844.JavaMail.jira@brutus> Date: Tue, 28 Jul 2009 00:21:14 -0700 (PDT) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Subject: [jira] Created: (FELIX-1413) Newly registered services must not immediately bound for static references MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Newly registered services must not immediately bound for static references -------------------------------------------------------------------------- Key: FELIX-1413 URL: https://issues.apache.org/jira/browse/FELIX-1413 Project: Felix Issue Type: Bug Components: Declarative Services (SCR), Specification compliance Affects Versions: scr-1.0.8 Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: scr-1.2.0 Consider a static component references with mulitplie cardinality, that is 0..n or 1..n. If the component is satisified and active, all services existing at the time of activation are bound. If now a service is registered matching the component's reference this newly registered service must not be bound to the component. Only if the component is reactivated for another reason (e.g. reconfiguration or removal of a statically bound service) may the newly registered service be bound. This is comparable to optional package imports: such imports are only wired to newly installed bundles when the importing bundle is explicitly rewired. In other words here is what may happen : (1) Component C is enabled, satisfied and activated. All services bound. C has static, multiple reference to Service type TS (2) Service S of type TS is registered (3) The service is *not* bound (4) Component C is deactivated (e.g. for reconfiguration) (5) Component C is still satisifed and activated. Now Service S is bound In current versions (1.0.8 and earlier) scr is immediately reactivating the component to bind the new Service S in step 3; which is wrong. See also the discussion on the OSGi dev list "Questions on DS Spec" [1] for full details. [1] http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg00883.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.