You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Samuel Cheung <SC...@Novarra.com> on 2004/03/05 01:58:17 UTC

RE: Hotswap servlet code in Tomcat 5?

If the objects in the session is serialized to the disk and then
re-serialized when I re-deploy my servlet, what happens if the class in my
newer version of my servlet has 
- added/removed methods/attributes in the class
- added/removed static variables in the class

How will the hotswap work? 

I use the hotswap debugging in eclipse IDE, sometimes the hotswap will fail
if I change the class structure. 

I assume hot-deploy of servlet will have the same issues. And how does
Tomcat resolve these issues.

Thank you for any help.



-----Original Message-----
From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
Sent: Mon, 23 Feb 2004 11:22:29 -0800
To: Tomcat Users List
Subject: RE: problem with tomcat shutdown on solaris
Howdy,

>With Tomcat 5, I can deploy/undeploy my WAR file thru the Admin
Interface.
>
>What happens if there are sessions running the servlet when I try to
>hotswap
>to a newer version (i.e. undeploy the current version and re-deploy a
newer
>version)?
>
>How will this work?

By default the sessions get persisted to disk and restored when the new
app starts up.  This is just like a normal server shutdown/restart.  You
can control this behavior by modifying the Manager element in
server.xml/context.xml for your webapp, as has been explained many times
on the user list.  In fact, this whole topic belongs on tomcat-user
rather than tomcat-dev, so please continue this discussion there if you
have further questions.

Yoav Shapira