logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Vera <Jv...@dicarta.com>
Subject RE: Re[2]: log4j and J2EE problem
Date Wed, 08 Aug 2001 19:04:32 GMT

>JV> My understanding from the Weblogic documentation,
>JV> http://e-docs.bea.com/wls/docs61///programming/packaging.html#1051556,
is
>JV> that Weblogic uses two classloaders per application.  One for EJBs and
one
>JV> for the webapp with the webapp's class loader being a child of the
EJB's
>JV> class loader.
>
>JV> So, how are people initialing log4j so that there is a single singleton
per
>JV> application in Weblogic?

>There indeed 2 classloaders, but if you put log4j.jar in the weblogic
>classpath during startup, there is only one instance. We use log4j for
>some weblogic plugins and several applications (some in .ear format,
>others as an expanded dir) and they all use the same log4j singleton.

That's true, but putting log4j.jar (or any other jar for that matter) in the
weblogic classpath is a fairly course operation.  You end up forcing all
applications to share the same log4j and they might have inconsistent uses
(I assume).  And this isn't an option when you are hot deploying an
appication into an already running Weblogic appserver.  I know there is some
way to put a third party jar into the EJB classloader of a deployed app (the
above reference discusses the advantages of this approach) but I do not know
what the mechanism is.  If anyone does I'd appreciate a pointer.

James

Mime
View raw message