You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/12/09 09:14:09 UTC

[jira] Commented: (SLING-1482) Commons Log should not export OSGi Configuration Admin package but have a dynamic dependency

    [ https://issues.apache.org/jira/browse/SLING-1482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969655#action_12969655 ] 

Felix Meschberger commented on SLING-1482:
------------------------------------------

Committed a first version in Rev. 1043855

This commit creates a new config subpackage encapsulating all Configuration Admin API interaction. ManagedService[Factory] services are now registered as ServiceFactory services thus they are only created once used ... and they are only used when the Configuration Admin service requests them and thus presence of the API can be guaranteed.

CAUTION: This commit is largely untested and needs further testing for

  (1) Whether it works at all
  (2) Works as intended, thus
          (2a) not requiring Configuration Admin API to operate logging
          (2b) support late arriving Configuration Admin setup

> Commons Log should not export OSGi Configuration Admin package but have a dynamic dependency
> --------------------------------------------------------------------------------------------
>
>                 Key: SLING-1482
>                 URL: https://issues.apache.org/jira/browse/SLING-1482
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>    Affects Versions: Commons Log 2.0.6
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: Commons Log 2.0.8
>
>
> Currently the Commons Log module exports the OSGi Configuration Admin package to be able to register ManagedService[Factory] services. This is probably very bad style but has been done to have the Log mechanism configurable as soon as the Configuration Admin service is registered.
> There is a better solution to this problem though:
>   * The OSGi Configuration Admin package is imported using DynamicImport-Package. This allows for
>        dynamic wiring only when the API is used.
>   * The ManagedService[Factory] services are registered as ServiceFactory services. This means,
>        that the actual Configuration Admin API (ManagedService[Factory] interfaces and ConfigurationException)
>        need only be wired, when these services are actually accessed -- which in turn is the case only
>        when the ConfigurationAdmin service is registered and starts working.
> Thus we solve the exact problem: Commons Log can be active and will be Configuration Admin configurable as soon as the ConfigurationAdmin service is active.

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