You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vi...@telenor.com on 2001/09/11 09:19:59 UTC

Should the Action class implement the java.io.Serializable ?

Are there any reasons for letting the Action class implement the interface
java.io.Serializable ?

I have seen other projects have a class definition like:

public class MyAction extends Action implements java.io.Serializable

If Struts is deployed in a clustered environment, is this recommended? 

That is, are there occasions where an instance of the MyAction class would
be serialized and passed between servers ?

Regards,
Vidar Alvestad
Forhandlerportal-prosjektet
(227) 84 131 / 982 19 367
vidar.alvestad@telenor.com
vidar.alvestad@bekk.no


Re: Should the Action class implement the java.io.Serializable ?

Posted by Ted Husted <hu...@apache.org>.
The actions are multithreaded, and shouldn't have any class data to
serialize ;-)

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/


Vidar.Alvestad@telenor.com wrote:
> 
> Are there any reasons for letting the Action class implement the interface
> java.io.Serializable ?
> 
> I have seen other projects have a class definition like:
> 
> public class MyAction extends Action implements java.io.Serializable
> 
> If Struts is deployed in a clustered environment, is this recommended?
> 
> That is, are there occasions where an instance of the MyAction class would
> be serialized and passed between servers ?
> 
> Regards,
> Vidar Alvestad
> Forhandlerportal-prosjektet
> (227) 84 131 / 982 19 367
> vidar.alvestad@telenor.com
> vidar.alvestad@bekk.no