On 8/31/05, Rich Feit <[EMAIL PROTECTED]> wrote: > > > Using JSF is actually what convinced me that having the context on > ThreadLocal is a great thing. It really cleans up the APIs. (Nice job > BTW :) ). Our ActionContext will give us something similar... but I do > wonder about "internal" attributes -- those that our code uses but which > shouldn't necessarily be exposed publicly. I'm torn between: > > - just putting them on the ActionContext > - creating a single gateway property on ActionContext for the > internal attributes > - using a subclass of our ActionContext, and casting down in our own > internal-attribute-aware code. > > It looks like JSF went with the first option. Has this been any trouble?
There hasn't been trouble that I'm aware of, but think about the alternative for a second. How much protection do your internal objects and properties have when you use a magic attribute key in some scope? :-) In practical terms, I think it's fair for the context object to have a property that returns some opaque (to the application) object that is reserved for use by the framework. Craig