If it is any consolation, the IniShiroFilter, while deprecated, won't be actually deleted until Shiro 2.x, which I'm sure is a long way away. You can continue using the IniShiroFilter until you have the opportunity to create the bridge code.
Or, if you like, feel free to create a Jira issue for an improvement - it would be extremely easy to create a subclass of ShiroFilter that initializes the necessary WebEnvironment at filter startup. If you can't use a servlet context listener, this would be the next best thing and would work as expected. The EnvironmentLoaderListener is extremely minimal on purpose - the real work is done in the parent class, which can be used from a Filter easily. The only downside of this approach is that other components that might need to access Shiro objects couldn't do so until the filter was initialized. This is why the listener approach is better. But it would still be the best available solution for non-listener environments. Feel free to open an issue and we can see about getting it in to 1.3. HTH, Les On Fri, Jan 20, 2012 at 3:36 AM, Cristiano Gavião <[email protected]> wrote: > Hi, > > Unfortunately not, without have to create some bridged code. Just because we > are stuck in some old servlet api that do not supply a way to register a > listener that is mandatory in the now-default ShiroFilter. > > regards > > Cristiano > > > On 19/01/12 19:01, Les Hazlewood wrote: >> >> The same effect can be achieved using the now-default ShiroFilter and >> register it as you would any other filter. Is this not possible? >> >> On Thu, Jan 19, 2012 at 12:41 PM, Cristiano Gavião<[email protected]> >> wrote: >>> >>> Shiro dev guys, >>> >>> I'm sent this mail to ask about the deprecation of >>> org.apache.shiro.web.servlet.IniShiroFilter. >>> >>> As I try to explain in the user list, the OSGi Spec for HTTP does not >>> provide a way to register Filter neither Listeners. >>> >>> But the HTTP API provided by both of the most used osgi containers >>> (Equinox >>> and Felix) provides a way to register Filters, but lacks a way to >>> register >>> Listeners. >>> >>> Don't know when this can happen, actually. People from IBM told me that >>> maaaaybe it could happen in next version of the OSGi Spec. >>> >>> So, I would like to ask to the Shiro team to review such deprecation for >>> now. >>> >>> regards, >>> >>> Cristiano
