At 12:49 AM 1/19/2005, Jacob Kjome wrote:
of course if you have the authority to add log4j.jar to the server's classpath,
why wouldn't you have the authority to add other jars there as well?
That's an extremely interesting point. Although you could place other jar files along with log4j-(core).jar, the idea is to avoid placing application specific jars high in the class loader tree. For instance, if log4j-db.jar were placed alongside log4j-(core).jar, you would also need to place the associated JDBC drivers alongside the log4j jars.
If on the other hand log4j-db.jar was bundled within the web-application's WAR file, then the required JDBC files could also be bundled or encapsulated within the web-app.
Ceki, you *always* assume that child-first classloading behavior will be
available, and this just isn't always true. In fact, Java2 classloading
behavior is the default for pretty much every appserver I can think of other
than Tomcat. Some provide the *option* to trigger child-first behavior, but in
many cases it is not very well supported. Tomcat is the only real example of
this being a viable option.
Point well taken. In case a web-app needs logg4j version X and the server provides some incompatible version Y under the Java2 delegation scheme, then unless the server can be instructed to use the delegation scheme specified in the Servlet Specification, the only remaining solution is to remove version Y from the server. Keeping BWC would at least guarantee that the server administrator could always safely replace an older version of log4j with a new one.
> >Anyways, as long as you can bundle what you want with your app, I'm happy. > > Bundling log4j.jar with your web-app will still be an option. However, > it will no longer the *only option. >
...Under Tomcat
and other containers as well, provided that newer log4j versions are backward compatible.
Jake
-- Ceki Gülcü
The complete log4j manual: http://www.qos.ch/log4j/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]