You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by lightbulb432 <ve...@hotmail.com> on 2007/12/13 00:46:57 UTC

What gets reloaded on Tomcat automatic reload

When a context is set with reloadable="true" and a change is made to one of
the appropriate folders, causing a context reload, what is and isn't
undeployed and redeployed?

I ask because, surprisingly, a static variable kept its state across the
automatic reload. Is this expected behavior? I thought it would be a
completely fresh, new deployment that's the equivalent of stopping and
restarting the server, with regards to the context with which you're
working.

However, stopping and restarting the server does, of course, clear the
static variable's state, but that's not the case with the automatic reload -
or am I probably just doing something wrong?

Thanks.
-- 
View this message in context: http://www.nabble.com/What-gets-reloaded-on-Tomcat-automatic-reload-tp14306781p14306781.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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


RE: What gets reloaded on Tomcat automatic reload

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
> Subject: What gets reloaded on Tomcat automatic reload
> 
> I ask because, surprisingly, a static variable kept its state 
> across the automatic reload.

Where is the class file for the static variable located?  All classes in
the webapp directory (or .war file) should be lost, since Tomcat creates
a new classloader for the redeployment.  If the class in question came
out of a higher-level library, it won't be affected.  Also, if an object
loaded from a higher-level library is hanging on to references to webapp
objects (a really bad design), you may still see values from the old
deployment.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org