struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGrady <m...@michaelmcgrady.com>
Subject Re: [OT] Serializing HttpSession Object
Date Fri, 16 Apr 2004 06:46:25 GMT
I just did a quick check and noticed that the session object is not 
serializable.  Have you checked out the RequestInfo object and its 
ilk?  Why don't you replace the current sessions with a set of session 
objects like the EJB 2.0 CMP entity beans?


At 11:27 PM 4/15/2004, Johan Wasserman - CPX Mngd Services wrote:
>I need to serialize the session and save it to a blob in MySql (i use
>Hibernate).
>
>I have tried, for example;
>...
>ByteArrayOutputSream baos = new ByteArrayOutputstream();
>ObjectOutputStream oos = new ObjectOutputStream(boas);
>oos.writeObject(session);  //<-- it fails here, nothing in the logs
>byte[] sessionAsBytes = baos.toByteArray();
>...
>
>I need this to give the user the option to restore a previous session
>(where they where before they last logged out, with all the session
>variables required to restore to that point).
>
>  Thanks, Johan.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message