Well as far as i know one way in which uid is helpful is in a scenario where
you have made some changes to a class file for example, added a new method,
attribute,ect. but an object using older version of the class file has been
serialized, now if you try to deserialize the object with the newer version
it would throw a ClassCastException , but if the older class file had a uid
which is the same as the newer class file, the object will be deserialized
successfully.
Just make a note that the new method, attribute added in the newer class
file will not be available from the deserialized object as these where not
present at the time of serialization of the object.
i'm not sure whether tomcat uses this mechanism in supporting persistent
sessions.
Have a nice day.
With regards,
Sachin S. Khanna.
www.emailanorder.com
----- Original Message -----
From: Duffey, Kevin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 23, 2000 6:08 AM
Subject: Re: Will Jakarta Tomcat Support Persistant Sessions?
> Is it necessary to use a uid in every serializable class for this to work?
> Or is that only for some other purpose?
>
> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, November 22, 2000 4:31 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Will Jakarta Tomcat Support Persistant Sessions?
> >
> >
> > "Craig R. McClanahan" wrote:
> >
> > > Peter Pilgrim wrote:
> > >
> > > > Craig
> > > >
> > > > That's great, exactly what I wanted to know.
> > > >
> > > > Your are saying Tomcat 4.0, at shutdown, can save the
> > sessions to a file or files
> > > > then reload them afterward, when it restarts.
> > > >
> > >
> > > Yep.
> > >
> >
> > I had better add one more clarification to this, so you will
> > know how it works.
> >
> > Tomcat 4.0 attempts to save your active sessions, and all of
> > their attributes, when it shuts down or is restarted. However,
> > saving attributes will only work if they are serializable
> > (that is, they and any classes they depend on implement
> > java.io.Serializable). Any of the attributes that are not
> > serializable will not be saved and restored.
> >
> > Craig
> >
> > ==============================================================
> > =============
> > To unsubscribe: mailto [EMAIL PROTECTED] with body:
> > "signoff JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set
> > JSP-INTEREST DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets