You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Matthias Kahlau <mk...@web.de> on 2006/01/25 00:03:39 UTC

What requires implementing the Serializable interface?

Hi!


Do I only have to implement the java.io.Serializable interface in my
Backing-Beans if I want to use t:saveState?



Regards,

Matthias


Re: What requires implementing the Serializable interface?

Posted by Werner Punz <we...@gmx.at>.
Matthias Kahlau schrieb:
> Hi!
> 
> 
> Do I only have to implement the java.io.Serializable interface in my
> Backing-Beans if I want to use t:saveState?
> 
> 
Depends some containers enforce the serializable for everything in the 
session, so it is a good practice to implement it anyway (you definitely 
cannot go wrong)
If you want to cluster it is mandatory anyway as well.

To my knowlege MyFaces did not enforce the serializable interface in the 
past (I dont know if that has changed since I serializable automatically 
in my backing beans, it sort of has become second nature)

To sum it up, no you should implement serializable if possible
due to inherent problems with web containers, which often do not like 
non serializable objects anymore, at least for objects which you want to 
keep longer than a single request.