You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gabriel Belingueres <be...@gmail.com> on 2008/06/30 17:13:59 UTC
[S2] adding serialVersionUID to actions
Hi,
Is there any value in adding the serialVersionUID to all our actions?
My idea is just to add a @SupressWarning("serial") to each action.
AFAIK, the actions are newly created in each request and are never put
into session or application scope (by Struts itself at least).
Any ideas of why the ActionSupport class implements java.io.Serializable?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] adding serialVersionUID to actions
Posted by Laurie Harper <la...@holoweb.net>.
Gabriel Belingueres wrote:
> Hi,
>
> Is there any value in adding the serialVersionUID to all our actions?
> My idea is just to add a @SupressWarning("serial") to each action.
>
> AFAIK, the actions are newly created in each request and are never put
> into session or application scope (by Struts itself at least).
>
> Any ideas of why the ActionSupport class implements java.io.Serializable?
You're right, S2 actions are generally expected to be request scoped.
I'm not sure why ActionSupport implements Serializable; it's probably a
legacy thing. As long as you stick to using request-scoped actions,
there probably isn't any value in generating serialVersionUIDs or them.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org