You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2009/06/15 13:13:07 UTC

[jira] Closed: (FELIX-1223) Replace ManagedService[Factory] by ConfigurationListener based component configuration

     [ https://issues.apache.org/jira/browse/FELIX-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed FELIX-1223.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: scr-1.2.0)

Implemented the change of getting component configuration in Rev. 784729.

Configuration is now accessed when a component is enabled using ConfigurationAdming.listConfiguration. Updates are received through a single ConfigurationListener.

This removes the need to register ManagedService[Factory] services on behalf of the components thus dropping the number of services dramatically. Also components will not be activated, deactivated and activated again on startup if configuration is only made available after the initial component activation.

> Replace ManagedService[Factory] by ConfigurationListener based component configuration
> --------------------------------------------------------------------------------------
>
>                 Key: FELIX-1223
>                 URL: https://issues.apache.org/jira/browse/FELIX-1223
>             Project: Felix
>          Issue Type: Improvement
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.0.10
>
>
> Currently configuration is provided to components by registering a ManagedService services for each non-factory component and ManagedServiceFactory services for each factory component. This has several drawbacks:
>   * It may lead to component cycling on startup: start with no configuration, get configuration after activation and this reactivate
>   * As a consequence of unneeded component reactivation, the system is loaded more and changes for deadlocks raise
>   * As a consequence of unneeded component reactivation, other components might need to be reactivated, too, further raising load
>   * It places a load on the service registry due to the number for registered ManagedService[Factory] services
>   * It makes it probably harder to implement FELIX-924
> As discussed on the dev list [1] it would be better to refactor configuration support as follows:
>   * When a component is created, the existing configuration is already retrieved from ConfigurationAdmin.
>   * SCR registers a ConfigurationListener which updates the components on configuration updates.
> Primarily the first step allows for simple FELIX-924 implementation in that on component activation, we may ensure configuration presence if required. Also it removes the requirement to reactivate components on startup since configuration events are only sent upon effective configuration change.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.