geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gulcu <>
Subject SLF4J in geronimo
Date Thu, 27 Nov 2008 17:05:33 GMT

Hello all,

I am trying to understand how Geronimo deals with slf4j
classes. First, I am totally unfamiliar with Geronimo's class loader
architecture. For obscure reasons, I have placed slf4j-api-1.5.6.jar
in $JAVA_HOME/jre/lib/ext and have commented out the following lines
from gsh-classworlds.conf

     #load ${gshell.home}/lib/slf4j-api-*.jar
     #load ${gshell.home}/lib/slf4j-log4j12-*.jar
     #load ${gshell.home}/lib/jcl104-over-slf4j-*.jar
     #load ${gshell.home}/lib/log4j-*.jar

Admittedly, placing slf4j classes under jre/lib/ext is not something
one should do. However, it allows me to override Geronimo's copy of
SLF4J with my own, as well as exporting slf4j classes to applications
running under Geronimo.

In this unusual setting Geronimo initializes itself
successfully. However, when a web-app contained in an .ear file
initializes, a *new* instance of SLF4J classes are loaded into
memory. The ear file does does not contain slf4j-api.jar, not in the
ear nor in the war file. I have checked and double checked this.

Thus, it seems to me that Geronimo is keeping one instance of SLF4J
classes for its own use and another instance for the applications it
hosts. Is my hypothesis correct?
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.

View raw message