tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: reloadable=true not working---> problems with reloading servl ets
Date Sat, 18 May 2002 17:36:42 GMT


On Sat, 18 May 2002, kelly, Burrowa wrote:

> Date: Sat, 18 May 2002 15:34:31 +0100 (BST)
> From: "kelly, Burrowa" <hello1790@yahoo.co.uk>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> Subject: Re: reloadable=true not working---> problems with reloading
>     servl ets
>
> Why is it that during reloading of changed classes,
> tomcat clears all variables from HTTPSession?
>

Java does not provide any APIs to replace the classes that have been
recompiled.  So, servlet containers implement reload by throwing away the
entire webapp class loader (including all classes that have been loaded
from /WEB-INF/classes and /WEB-INF/lib), and starts the app over again.

However, Tomcat also implements a feature that helps in the scenario you
describe -- if you make sure that all of the beans you store as session
attributes are Serializable, then Tomcat can save and restore them for you
as it does the restart.  This also works across a regular shutdown and
restart of Tomcat itself.

> kB
>

Craig


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


Mime
View raw message