on 1/2/2001 12:11 PM, "Rafal Krzewski" <[EMAIL PROTECTED]> wrote:
>>> J2EE specification requires that all objects that
>>> are stored into the the HttpSession should be Serializable.
>>
>> URL or quote please?
>
> Servlets 2.3 (public draft August 15 2000), section 7.7.2, page 51 :
>
> 7.7.2 Distributed Environments
> Within an application that is marked as distributable, all requests that
> are part of a session can only be handled on a single VM at any one
> time. In addition the container must be able to handle all objects
> placed into instances of the HttpSession class using the setAttribute or
> putValue methods approriately.
>
> * The container must accept objects that implement the Serializable
> interface
> * The container may choose to support storage of other objects in the
> HttpSession (such as references to Enterprise JavaBeans and
> transactions), migration of sessions will be handled by
> container-specific facilities.
For some reason, I was reading your "should" as a "must" and that is not
accurate. :-)
Essentially, the HttpSession can accept any type of object and if that
object is not Serializable, it may also offer a way to achieve the
serialization in a container specific way.
I have been lobbying within JSR 053 to change it to say that *only* objects
that are Serializable will be accepted because otherwise, there is no solid
way (other than to log something) to notify the developer that they have
lost their session as a result of a classloader reload or something like
that but I haven't gotten real far yet so I was looking for ammo outside of
the servlet spec (/me thinking that your statement of J2EE was some other
document) that mandated that. :-)
> I couldn't find any reference to it in the javadocs :(
Yea, after 2.0, they moved away from putting as much info in the Javadocs
and more into the actual specification document.
-jon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]