You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Crowther <Pe...@melandra.com> on 2005/04/01 13:40:58 UTC

[OT] Serialization (was RE: Clustering question)

> From: Dale, Matt [mailto:Matt.Dale@beCogent.com] 
> Yes this is a problem. All objects contained within a 
> serializable object must in turn be serializable themselves.

Or marked as 'transient'.  This omits them from serialization.

		- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: [OT] Serialization (was RE: Clustering question)

Posted by "Richard Mixon (qwest)" <rn...@qwest.net>.
Peter Crowther wrote:
>> From: Dale, Matt [mailto:Matt.Dale@beCogent.com]
>> Yes this is a problem. All objects contained within a
>> serializable object must in turn be serializable themselves.
>
> Or marked as 'transient'.  This omits them from serialization.

If you mark them as transient, you may need need to implement a method
(ReadObject I believe) that properly initializes the transient
variables/objects.

There is an earlier post on this list where I describe how to do this. I
had a similar problem in that many of my classes had a Commons Logger
object stored in them. This had to be re-instatiated correctly when the
object was replicated.

HTH - Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org