On Sun, 11 Nov 2001, Marko Asplund wrote:
> Date: Sun, 11 Nov 2001 21:37:07 +0200 (EET)
> From: Marko Asplund <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: non-serializable objects in sessions
>
>
> how should non-serializable objects be stored in HttpSessions? i'd like to
> be able to use the PersistentManager for storing the serializable objects
> inside sessions while skipping the non-serializable objects like database
> statement handles. how can this be accomplished with Tomcat v4.0.1?
>
It can't.
There is no way in Java to persist a non-Serializable object like a
database statement. In fact, you cannot even use such a thing if you're
using a connection pool (completely separate from session persistance
issues) unless the connection pool itself implements support for this.
If you need persistence, you have to be aware of what can and cannot be
persisted. It's possible that Enterprise JavaBeans (EJBs) might be a
better solution to the types of problems you are looking at, because they
deal with low level persistence issues for you.
> --
> aspa
>
Craig McClanahan
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>