On 8/31/05, Rich Feit <[EMAIL PROTECTED]> wrote:
> 
> I actually agree that a single bean is better than a lot of separate
> values under various keys. In Beehive we put most of our request-scoped
> values onto a request wrapper -- this turned out to have better
> performance than doing the attribute lookup all over the place. But
> it's a similar idea.


JSF likes a single "context" bean as well (FacesContext). One choice that 
JSF also made should be considered here, in terms of providing access ... 
there's a static FacesContext.getCurrentInstance() method that returns the 
current context object for the current request thread (it's implemented with 
a ThreadLocal). The nice thing this does is eliminates the need to have any 
magic attribute key at all, as well as *having* to pass the context object 
in to every single method call.

Craig

Reply via email to