> From: Jamie [mailto:[EMAIL PROTECTED]
> Subject: Re: logging with multiple web applications
>
> Ok. I currently have the log4j-1.2.14.jar file in the WEB-INF/lib
> directory. I will remove it.

No, that's where it's supposed to be; one copy for each webapp.  I was 
referring to Tomcat's lib directory, not each webapp's.

> I do have shared JARs and class files across web apps.

That is most likely the source of your problem.

> This is a strongly desired feature as the intention is to
> minimize the memory footprint of each web app.

Unless you have many thousands of shared classes, your concern is probably 
unfounded.  By introducing such run-time dependencies, you pretty much 
guarantee that you have to take the whole server down to update a single 
webapp, and created versioning hell when you need to update a shared library 
for one particular webapp but not the others.  Memory is cheap; don't be afraid 
of configuring a larger PermGen when needed.

> Is there a way to use shared libs/classes and
> have the logging output separate?

Yes, but it's ugly: each caller of a method in a shared class must pass in a 
reference to the webapp's logger, rather than letting the shared class have its 
own.  You really don't want to do that, since it complicates and obfuscates the 
interface.  Just stop sharing your classes.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to