logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject I think I may have introduced an OSGi race condition.
Date Mon, 21 Jul 2014 03:54:27 GMT
I'm not sure on how to reproduce it, but sometimes LogManager gets a
Log4jContextFactory, sometimes it gets a SimpleLoggerContextFactory. Both
bundle listeners are synchronous, but I think the order that
SynchronousBundleListener classes get invoked is undefined. It appears that
coordinating two separate bundles in such a way is harder than I expected.

In SLF4J, it's a bit simpler since the API doesn't include a default
implementation. In that case, the API bundle can wait until an
implementation bundle is available before itself becoming available.

Any ideas on how to do more appropriate locking or allowing this to work
out of order? I'd prefer to avoid adding in the OSGi compendium services
(although they would certainly make this easier) in order to prevent
unnecessary dependencies in OSGi.

Matt Sicker <boards@gmail.com>

View raw message