Daniel Fagerstrom wrote: > >>How above Request interface additions will relate to methods already >>added to 2.2 interface: >> >> Object getAttribute(String name, int scope); >> Object searchAttribute(String name); >> Enumeration getAttributeNames(int scope); >> void setAttribute(String name, Object o, int scope); >> void removeAttribute(String name, int scope); >> >>Can any of those be renamed / reworked to be consistent with the >>proposed additions? As we had no single 2.2 release yet, it's good time >>to review those additions. > > > I don't know why we need differnt scopes, maybe Carsten can comment. > The discussion about scoped attributes is here: http://marc.theaimsgroup.com/?t=108901128600001&r=1&w=2
Basically, in 2.1.x the request attributes are shared between the global request and all its internal requests. So internal requests can overwrite attributes of the global request or of some parallel internal ones. And this can lead to very interesting results. So, scoped attributes are a way to solve this problewm. I recently added the searchAttribute() method that first looks in the local scope and then in the global scope for an attribute. I agree with Vadim, that we somehow should consider these things as well. Carsten -- Carsten Ziegeler - Open Source Group, S&N AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/
