No, that's not completely true.
It might depends on what engine you use, but even non serializable objects
can be stored in a session. However, when the server runs out of memory,
(s)he might try to store some session variables to disk. This will f course
only work with serializable objects. I don't know what happens with non
serializable objects? I guess, you always have the chance of losing them. If
you restart the server, all non-serializable objects are lost for sure. Same
problem for sessions shared over multiple servers.
Conclusion: If you can, use serializable objects, but if it's not really
crucial you can use others as well.

Geert 'Darling' Van Damme


> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew S Tomlinson
> Sent: zaterdag 4 december 1999 19:02
> To: [EMAIL PROTECTED]
> Subject: Re: Session Variables
>
>
> It is my understanding that you can only save objects in the
> session if they
> are serializable.
> App servers may flush session data out to disk. Moreover,
> according to a BEA
> rep at a recent seminar that is how Weblogic supports session continuity
> across multiple servers in a fault-tolerant cluster - all the
> servers access
> a common repository of session data (I am still a bit dubious about the
> reliability of this but this is how they explained it).
>
> Anyway, if your object isn't serializable you can't put it in the session
> and I do not think the JDBC connection or resultset are
> serializable (and if
> they are is there not some security issue here?)
>
> Anyway - would love to hear what the group knows about this...
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to