Uploaded image for project: 'Commons Logging'
  1. Commons Logging
  2. LOGGING-190

ServiceLoader with OSGi improvements (so commons can be used in an OSGi environment)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.2
    • None

    Description

      Log4j JCL bridge already has the correct osgi stuff in the manifest to create the bridge in an OSGi environment for example Eclipse

       

      But commons logging does mis a bit, it only has:

      Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"

       

      but that should be:

       

      Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.service
       loader.processor)(version>=1.0.0)(!(version>=2.0.0)))",osgi.serviceload
       er;filter:="(osgi.serviceloader=org.apache.commons.logging.LogFactory)";os
       gi.serviceloader="org.apache.commons.logging.LogFactory",osgi.ee;filter:="
       (&(osgi.ee=JavaSE)(version=1.8))"

       

      so that it hooks up with for example what is specified in the jcl bindings of log4j-jcl which defines this:

       

      Provide-Capability: osgi.service;objectClass:List<String>="org.apache.co
       mmons.logging.LogFactory";effective:=active,osgi.serviceloader;osgi.ser
       viceloader="org.apache.commons.logging.LogFactory";register:="org.apach
       e.logging.log4j.jcl.LogFactoryImpl"
      Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.service
       loader.registrar)(version>=1.0.0)(!(version>=2.0.0)))";resolution:=opti
       onal,osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"

       

      So could the thing above be added to the build so it has the correct osgi registration stuff?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jcompanger@gmail.com Johan Compagner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: