--- Robert Leland <[EMAIL PROTECTED]> wrote:That is MUCH simpler and RESPONSIVE than the scheduler !
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.
So we are consistent on the 'state' flag names like -used-.... Bug 18022, talked about wrapping the ActionForm with another class when it was returned from the createActionForm method. It would have two attributes: -recycled-, and ActionForm.
It would be nice if the terms -used-, and -recycled- fit a theme. Since the code hasn't been written yet, your at liberty to pick that theme.
-Rob
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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]