On Thu, 17 Oct 2002, atta ur-rehman wrote:

> Date: Thu, 17 Oct 2002 13:36:41 -0700
> From: atta ur-rehman <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: Session Cleanup
>
> Thanks, David. Putting commonly used collection in the application scope is
> a nice idea; both for storage space and performance reasons.
>
> Now how do I store my form beans in request instead of session? Is it the
> "scope" attribute of the action mapping that determines it?

Yes.

> And what are
> performance implications of this change?

The set of attributes in the request or session object supplied by the
servlet container is usually a HashMap, so performance of storing the form
bean in either is equivalent.  However, your app will benefit from the
fact that the form bean is automatically released at the end of the
request, so the overall memory occupancy of your app will likely be lower,
but the CPU time consumption might be higher (due to increased garbage
collection).

For most apps, this tradeoff is very much worth it because having excess
CPU capacity is more common than having excess memory to store the form
beans in session scope in between requests.

>
> Regards,
>
> ATTA

Craig


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to