You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Theodore Chen <th...@perceptive.com> on 2003/03/13 01:34:26 UTC

Extraneous webapp stop/restart after manager deploy

I'm seeing a potential bug in Tomcat (tested in both 4.1.12
and 4.1.21 Beta) and wanted a sanity check...

Here's the scenario:

I am deploying a simple webapp via the Tomcat 4.1.X manager.
After deploying the webapp once, I update the timestamp on
/WEB-INF/web.xml and redeploy (undeploy followed
by a deploy).  Both by monitoring the default
localhost_log.<date>.txt log and by using a thread profiling
tool (JProbe "threadalyzer"), I noticed that there seems to be
a redundant (and erroneous) webapp stop and restart.  I see a stop
and a restart that are caused by the actual deploy and then
within a few seconds, I see a second stop and restart.

In org.apache.catalina.startup.HostConfig, there's a thread
that periodically checks if the deployment descriptor
(/WEB-INF/web.xml) of a webapp has been modified and if it has,
the webapp is stopped and restarted (presumably via a catalina
LifecycleEvent).  If I'm reading the code correctly, there is
a HashMap in HostConfig that contains the last modified times
for the various web.xml files.  It seems that deploying through
the manager webapp does not update this Map (nor is this Map
particularly accessible without some refactoring).

Having a redundant stop and restart may not be bad (though it
would seem to be a bug).  However, I'm trying to track down
a resource leak where I am only able to redeploy 3 or 4 times
before I see an OutOfMemoryError and I am trying to rule out
this stop/restart behavior.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org