[slf4j-dev] State of OSGi & SLF4J

Ceki Gülcü listid at qos.ch
Fri Feb 23 20:35:47 CET 2007




At 11:21 PM 2/22/2007, John E. Conlon wrote:
>
>"Crap" is necessary to prevent client bundles that import the org.slf4j
>package from being 'wired' by the OSGi runtime classloader matrix to the
>slf4j-api bundle.  Clients wired to this bundle will get
>ClassNotFoundExceptions when they try to use get a logger.  This is
>because its packages org.sl4fj and org.slf4j.impl are 'split' across the
>api and the binding bundle.  It will look okay as long as no bundle
>tries to load any classes.
>
>As soon as I can build the trunk I will adjust latest metadata to
>accommodate the split packages and preform the OSGi profile tests.

I meant no offense with the term "crap". Regardless, I should have
used more appropriate terminology.

Anyway, I was referring to section 3.13.2 (page 68) of the OSGi Core
specification. According to my very limited understanding, the use
"Require-Bundle" keyword is discouraged. In particular, the use of
"partial=true;mandatory:=partial" which SLF4J no longer needs, as it no
longer has split packages. I use the term split package as defined in
the specification (page 68):

   Split Packages: Classes from the same package can come from
   different bundles with Require bundle, such a package is called a
   split package.  Split packages have the following drawbacks:
   ...

You seem to think that SLF4J has split packages. We used to but I
don't think that is still the case. All required classes in org.slf4j
are packaged within slf4j-api.jar and all required classes in
org.slf4j.impl are package within slf4j-xxx.jar where xxx stands for a
given binding.

What am I overlooking?

Wishing you a nice weekend,


>kind regards,
>John

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch




More information about the slf4j-dev mailing list