[slf4j-dev] [Bug 75] Cyclic dependency in OSGi
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Wed Feb 27 13:47:40 CET 2008
http://bugzilla.slf4j.org/show_bug.cgi?id=75
------- Comment #1 from mirkojahn at gmail.com 2008-02-27 13:47 -------
I just noticed that in 1.5 all implementations are actually fragments of the
API. Certainly a solution for the cyclic dependency problem, it is not
propagated way, how it is done in OSGi (I would say).
My major problem with this is, that I am now no longer able to use OSGi
specific services. In order to use services I need to have access to the
BundleContext object, which is provided by the Activator of a bundle. Fragments
however don't have Activators and the API bundle doesn't provide an Activator
my "fragment" can use.
This leaves two possibilities with the fragment solution:
1. One has to change the SLF4J-API bundle and add the necessary, domain
specific code in order to use services in a specific logging implementation.
2. The SLF4J-API bundle provides generic access to the BundleContext Object
with an Activator and all impl. Fragments can use that one accordingly.
I would prefer the second one, because it is generic and doesn't impose
implementation or domain specific dependencies to the API, thus the danger of
having multiple tweaked SLF4J-API bundles flying around will be minimized.
Alternatively, the fragment approach can be withdrawn and a simple solution as
depicted above can be used. This would also remove the need for other logging
impl. to add the fragment-host header (not that this is a huge burden, but it
might take some time till this is included an actual release).
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the slf4j-dev
mailing list