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/04/11 23:33:43 UTC

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

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.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira