tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carey Boldenow" <c.bolde...@cyterasystems.com>
Subject RE: serialized objects invalidating session
Date Tue, 10 Aug 2004 16:50:04 GMT
Well I installed 5.0.27 and now the behavior is somewhat like what Jacob
indicates below. What appears to be happening now is that no matter what
I do to my object (have it implement Serializable interface or not), my
session is never recovered after stop/start of Tomcat. My first question
is is there a configuration parameter I need to set to allow Tomcat to
serialize the sessions in 5.0.27? ... or what may be happening is that
per Jacob's response, there is some other object in the session that
does not implement the Serializable interface, so therefore, the whole
thing is trashed. FYI, my object is simply implementing the Serializable
interface. I am doing nothing else like implementing readObject,
writeObject, etc..

Regards,
Carey

-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: Tuesday, August 10, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: serialized objects invalidating session

This is all based purely on my observation of Tomcat behavior and hasn't
been
verified by looking at the code.  With that said....

Recent versions of Tomcat will trash the serialized session if any of
the
objects stored there are not Serializable.  In the past,
non-serializable
objects would cause exception to be thrown in an attempt to deserialize
them,
but the serializable objects of the session survived.  It is all or none
now.  I
suspect that there is at least one non-serializable object in your
session.  It
might not even be something you are meaning to put there.  It might be
something
added by the presentation framework you are using without your
knowledge.

I'd bet that it all works for you in a simple test of adding a string to
the
session.  You'll just have to fetter out which object is the
non-serializable
one.  Keep in mind that a non-serializable member variable of an
otherwise
serializable object will cause a deserialization exception.

Jake

Quoting "Shapira, Yoav" <Yoav.Shapira@mpi.com>:

> Hi,
> Does this behavior also happen for you in 5.0.27?
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> >-----Original Message-----
> >From: Carey Boldenow [mailto:c.boldenow@cyterasystems.com]
> >Sent: Tuesday, August 10, 2004 10:05 AM
> >To: 'Tomcat Users List'
> >Subject: RE: serialized objects invalidating session
> >
> >Hi,
> >
> >I am using version 5.0.19. The objects that I am serializing contain
> >nothing but String attributes and a Collection of other String
objects.
> >After shutting down Tomcat, I can view the SESSIONS.SER file and I
can
> >make out what appears to be those objects. However, once I restart
> >Tomcat, and invoke request.isRequestedSessionIdValid(), it returns
> >false. However, it returns true if I do not serialize my objects.
> >
> >Regards,
> >Carey
> >
> >
> >-----Original Message-----
> >From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
> >Sent: Tuesday, August 10, 2004 7:54 AM
> >To: Tomcat Users List
> >Subject: RE: serialized objects invalidating session
> >
> >Hi,
> >5.0.27 is stable.
> >
> >Yoav Shapira
> >Millennium Research Informatics
> >
> >
> >>-----Original Message-----
> >>From: Alex [mailto:alex@squigly.net]
> >>Sent: Tuesday, August 10, 2004 9:17 AM
> >>To: Tomcat Users List
> >>Subject: RE: serialized objects invalidating session
> >>
> >>
> >>is 5.0.27 no longer beta?  sometimes i see you folks posting to
> >>tomcat-dev@ when new releases are available...but i never saw
anything
> >>stating it's moved out of beta.
> >>
> >>On Tue, 10 Aug 2004, Shapira, Yoav wrote:
> >>
> >>> Date: Tue, 10 Aug 2004 08:56:36 -0400
> >>> From: "Shapira, Yoav" <Yoav.Shapira@mpi.com>
> >>> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> >>> To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> >>> Subject: RE: serialized objects invalidating session
> >>>
> >>> Hi,
> >>> Needless to say, it works for me ;)  We routinely save/restore
> >sessions
> >>> with Serializable attributes.  (Although you didn't specify what
> >Tomcat
> >>> release you're using, I'm assuming and using 5.0.27).
> >>>
> >>> Yoav Shapira
> >>> Millennium Research Informatics
> >>
> >>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

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


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