On Sat, Oct 26, 2002 at 10:59:58AM +0200, Rickard ?berg wrote:
> Gavin King wrote:
> >I'm not sure if it fits your philosophy, but I would have liked
> >ActionSupport to provide
> >
> >Map getSession()
> >Map getApplication()
> 
> As opposed to ActionContext.getSession()? Do this in your own 
> ActionSupport base class if you want. Adding it in WW's ActionSupport 
> seems like a bit too much overkill and just hides things too much (IMHO).
> 
> >to provide easy access to the context objects. Actually, before I realised
> >that *Aware were deprecated, I thought that it would have been best if
> >ActionSupport already implemented *Aware and then returned the objects
> >passed to *Aware() from the getters above.
> 
> That would have been bad from a performance point of view. There's also 
> the problem that we want the context to be easily extensible, which 
> would also wreck this idea.

What if the *Aware interfaces still go away, but the setters in the
action stayed? Then you could just do a bean-copy from the ActionContext
to the Action as part of the factory chain. This lets you keep inversion
of control without having to add a new factory proxy every time you add
something new to ActionContext. Performance probably isn't affected too
much--you only copy over the necessary bean properties, and you don't
have to do the multiple ThreadLocal lookups that using the ActionContext
implies.

-Chris


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to