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 E723D1040A for ; Thu, 19 Sep 2013 06:04:53 +0000 (UTC) Received: (qmail 12404 invoked by uid 500); 19 Sep 2013 06:04:52 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 12357 invoked by uid 500); 19 Sep 2013 06:04:52 -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 12346 invoked by uid 99); 19 Sep 2013 06:04:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Sep 2013 06:04:52 +0000 Date: Thu, 19 Sep 2013 06:04:51 +0000 (UTC) From: "Carsten Ziegeler (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (FELIX-4149) Do not directly support modifying service registration properties 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-4149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13771618#comment-13771618 ] Carsten Ziegeler edited comment on FELIX-4149 at 9/19/13 6:04 AM: ------------------------------------------------------------------ I really think we should tackle this for the next release. While I would prefer to simply remove this - a discussion on the mailing list did not reveal that anyone is using this - disabling it by default is fine as well. On the other hand, the feature is only available if you cast the ComponentContext to ExtComponentContext or use http://felix.apache.org/xmlns/scr/v1.2.0-felix as the namespace - so I'm wondering if we need to do anything at all? was (Author: cziegeler): I really think we should tackle this for the next release. While I would prefer to simply remove this - a discussion on the mailing list did not reveal that anyone is using this - disabling it by default is fine as well. On the other hand, the feature is only available if you cast the ComponentContext to ExtComponentContext - so I'm wondering if we need to do anything at all? > Do not directly support modifying service registration properties > ----------------------------------------------------------------- > > Key: FELIX-4149 > URL: https://issues.apache.org/jira/browse/FELIX-4149 > Project: Felix > Issue Type: Task > Components: Declarative Services (SCR) > Affects Versions: scr-1.6.2 > Reporter: Felix Meschberger > Fix For: scr-1.8.0 > > > With FELIX-3377 we implemented a feature for a component to easily influence its service registration properties. This sounds very useful upfront but has some intricate implications: > * If a component is instantiated multiple times as a result of being a factory service (instantiation per using bundle) or even as a new prototype service (instantiation per retrieval from the service registry) each such instance may independently modify the service registration properties of the shared service registration. This may have strange implications. > * If changing the service registration properties may cause changes in using the service, it may be that a loop may be created: Consider a component C1 being registered as a delayed service. When this service is retrieved using a service filter, the component is activated and may change the registration properties. This may cause the consumer's service filter to not match any more and hence to unget the service immediately. This may cause the Component C1 to be deactivated and change back the service registration property. Now the consumer's filter matches again and C1 is retrieved and activated again ... > Now, granted both situations may also happen if DS would not support setting service registration properties. But the chances of falling into the trap is higher if it would be too simple to do. Also explaining the why's and pro's and con's etc. is somewhat complicated. On the other hand the use case is not one happening very often -- in our application of 100s of components we had it once or twice. > So the OSGi CPEG decided to not add this feature to the specification. > I am aware, that we unfortunately already released a version of Felix DS supporting this feature. So it will be a hard decision to revert that. > I propose to disable the feature by default and allow it to be explicitly enabled using some configuration (similar to what we did with the non-spec-compliant handling of factory configuration for Component Factory components). -- 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