tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: How to serialize an object which is put in the session ?
Date Mon, 23 Jun 2003 13:06:42 GMT

Howdy,

>I have a class which implements the HttpSessionBindingListener
interface. I
>want to serialize this object and all sessions when the context is
>reloaded.

That's a pain to do.  The contextDestroyed() event in the
ServletContextListener is too late.  The sessionDestroyed() event in the
HttpSessionListener is a good place to do this for one session.  This
event will get called once for each session when the container is
shutting down, so you'd have to serialize each session separately.


>It is essential because three deveopers are using the same server and
if

Bad idea.  One developer per server will save you a lot of problems,
including this one.

>throwing Nullpointer exception after reload. How to know that the
object
>and
>session is saved when the context is reloaded.

Use logging in the object to tell you "I'm being saved" or "I'm being
restored".

>The 4.0.3 version gves better logs.

I completely disagree with that ;)  I think every version of tomcat has
given better logs than its predecessor.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message