On Wed, 2 Oct 2002, Taylor, Jason wrote:
> Date: Wed, 2 Oct 2002 08:37:59 -0700
> From: "Taylor, Jason" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: [SURVEY] Session-based forms vs. request-based forms
>
> Right now, I'm converting my session-based forms to request-based forms
> because I'm trying to minimize my use of the session object.
>
> The reason is that I found out that when my container runs in clustered
> mode, it serializes the attributes of the session object and broadcasts the
> updates across the network to one or two machines with backup sessions
> anytime the setAttribute() and removeAttribute() methods are invoked.
> Therefore, there seems to be a lot more overhead in a cluster than
> standalone in terms of session serialization due to additional network I/O
> and deserialization on the backup session servers.
>
> Would anyone care to share their wisdom on the subject of request vs.
> session scope for forms in a clustered environment? Am I right that
> session-based forms should be avoided unless required by performance or
> business logic concerns? Any thoughts would be helpful.
>
>
Using request scope instead of session scope is generally a good idea,
even on a non-distributed container, to minimize the memory use of your
application in between client requests. The caveat is that you have to
maintain all of your transactional state in your forms (usually done with
hidden fields) for multi-page transactions.
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>