On Oct 20, 2009, at 2:32 PM, Sergiu Dumitriu wrote:
On 10/20/2009 02:16 PM, Asiri Rathnayake wrote:
Hi,
I don't understand why you've used "transient". Can you explain?
Sorry, "mutable servlet field" was not the error. It was "A non-
serializable
value is stored into a non-transient field of a serializable
class". My
mistake.
This is why I added the transient field thinking it would fix the
problem.
It did fix the problem but I wasn't sure if that is the correct
thing to do.
Thanks.
Why don't you make them static? Instance members of a singleton
class is
roughly equivalent to static members.
Please don't use statics. This is an antipattern. BTW I'm pretty sure
I've read that statics can be lost when an object is serialized if the
JVM unloads the class.
Thanks
-Vincent