I am working on a small web application (a simple prototype for the moment), and naturally I use the HiveMindFilter to build the Registry. In my previous usage of HiveMindFilter, I never encountered any problem with the fact I had to use getRegistry(HttpServletRequest request) to get the Registry. Indeed, the only location where I needed access to the Registry were my struts actions, from where the HttpServletRequest is available, so no problem.
But now I am faced to a new problem: I need security in my application, and for this I use the open source "Security Filter". I just need to provide it with a class implementing the SecurityRealmInterface, then SecurityFilter will instantiate it when it needs. Now the problem is that this class needs to access some service in HiveMind and thus needs access to the Registry. But unfortunately (actually, this is not unfortunate this is just logical) none of the methods of SecurityRealmInterface are passed the current request! So now how do I access the Registry that has been constructed by the HiveMindFilter? After having a look at HiveMindFilter implementation, I was wondering why it seems so "complex", I mean: why do we need to store the same Registry in the request, why not store it directly in a static variable and make it available through a static method with no argument? Is there a problem to having the Registry as static? What should I do to work around this problem? - write my own simple servlet filter (partly based on HMFilter) that stores the Registry as a static variable. - use the RegistryBuilder.constructDefaultRegistry() in my SecurityRealm class? Will it return the same Registry as HMFilter or construct another one? - some other workaround? Thank you in advance for any help related to this point, I am kinda stuck on this. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
