Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1482

Commons Log should not export OSGi Configuration Admin package but have a dynamic dependency

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Commons Log 2.0.6
    • Commons Log 2.1.0
    • Commons
    • None

    Description

      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.

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: