tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilbert, Antoine" <AGilb...@korem.com>
Subject RE: Undeploying problem with Tomcat 5.5 and Log4J
Date Wed, 03 Jan 2007 16:29:03 GMT
I'm not sure I understand. Calling shutdown within a finalize() of my
objects ? Does this will cause problem to the other Web apps running
within the tomcat instance ?

-----Original Message-----
From: Mikolaj Rydzewski [mailto:miki@ceti.pl] 
Sent: January 3, 2007 10:52 AM
To: Tomcat Users List
Subject: Re: Undeploying problem with Tomcat 5.5 and Log4J

Gilbert, Antoine wrote:
> I deploy an application WAR on a Tomcat 5.5 instance. This application
> use Log4j (via commons-logging) and create some logs in a file within
> the related Web app directory (/webapps/myWebApp). The file is defined
> by a file appender tag in my log4j.xml file.
>   
It's a good practice to avoid writing files inside application's 
directory. It's also a good practice to have separate directory for 
logfiles, i.e. ${CATALINA_HOME}/logs.
> The problem is when I undeploy this Web app, my Web app directory
can't
> be deleted because of the log file; it seems to be locked by Tomcat.
>   
Try to call shutdown() 
http://logging.apache.org/log4j/docs/api/org/apache/log4j/LogManager.htm
l#shutdown() 
in contextDestroyed event in servlet context listener.


-- 
Mikolaj Rydzewski <miki@ceti.pl>


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


Mime
View raw message