tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@clearink.com
Subject Re: Servlet reloading?
Date Sat, 12 Feb 2000 21:59:57 GMT
> But don't you still have a problem if the class for one of the objects
> in a session has been changed, for instance, an instance variable has been
> removed or added? When you try to "copy" it into the new class loader, the
> serialized format doesn't match the new class.

That is a potential problem, yes, but I don't think that it happens enough
to be a major worry. The advantages FAR FAR FAR outweigh this small issue.
Remember, in this case you are talking about a development environment.

> And in some cases, like 
> Eugen mentioned, the new version of the servlet may not even want the old
> session data.

Again, something very rare and again, this is something that you would get
by simply restarting the server...ie: the same functionality that you have
to go through right now!
 
> I have always looked at servlet reloading in general, with or without
> trying to preserve the state of things in the session, as something that
> only works in the most simple cases. To support application updates, at any
> level, probably requires a new protocol between the server and the
> application components (servlets, session beans, etc.) so they can decide
> on a class by class basis what should be reloaded or not, and support
> a more advanced way to restore state than simply serialize/deserialize.

bingo, but that is a huge wast of work to do when in most cases, this is
*strictly* development environments that we are talking about here.

-jon


Mime
View raw message