So how do you know which ones are not used anymore?

----- Original Message -----
From: "Hoang, Hai" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 1:49 PM
Subject: RE: Session Cleanup


> I often stored my form beans in a session scope.  I've a routine that
> looping through the session and destroy the unused forms.  The tricky part
> is how to determine with forms are no longer in used.
>
> Anyone out there using this technique?
>
> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> Sent: Thursday, October 17, 2002 3:37 PM
> To: Struts Users Mailing List
> Subject: Re: Session Cleanup
>
>
>
> 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>
>
>
> _________________________________________________________________________
> Introducing the all new and improved continental.com.  With a totally new
> personalized design, it's the best place to go. Before you go.
>
> Continental Airlines. Work Hard. Fly Right.
>
> http://www.continental.com
>
>


--
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