--- Robert Leland <[EMAIL PROTECTED]> wrote:
> Use Cases:  I am not familar with the particular use cases where the 
> ActionMessage needs
> to hang around in the session. So these suggestions might not fit.

The main reason I've seen on the user list (and the reason I need it) is
to redirect to a success/error page and display messages.  Storing them in
the request only works for forwards.

> Questions:
> Would managing the life cycle through the struts-config.xml, like the 
> ActionForm work ?

Maybe, do you have more details on this idea?

> or
> How about a PlugIn that has the ability to schedule a cleanup of a 
> session variable after
> a configurable amount of time ?  The method that reads the message from 
> the session
> would need to be syncronized. This doesn't have to be a plugin.

This gave me a different idea.  What if the ActionMessages had a "used"
flag that is set to true the first time its messages are accessed.  The
RequestProcessor would have a new "processCachedMessages" method that
would check the flag and remove from the session as needed.

This seems more responsive than a periodic cleanup and we wouldn't have to
cache HttpSession objects which may not be safe/legal.  Also, I think
placing the cleanup in the RequestProcessor guarantees that it is
performed rather than relying on Actions to do the cleanup.

Comments?

David

> 
> -Rob
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to