shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Bunting (JIRA)" <>
Subject [jira] [Commented] (SHIRO-318) Guice integration causes a warning from guice-servlet
Date Fri, 05 Aug 2011 13:37:27 GMT


Jared Bunting commented on SHIRO-318:

It looks like the filters (well, anything that implements ServletContextSupport) are asking
for a ServletContext at startup time via the BeanTypeListener, which guice-servlet doesn't
like.  We are already binding a ServletContext in ShiroWebModule (with an @Named annotation),
so we just need to make sure that that's the one getting injected by BeanTypeListener.  I
think I'm going to add a BeanTypeListener "mapping" concept for this purpose. (map type->Key
for use in BeanTypeListener - right now it assumes a Key w/o annotation).

> Guice integration causes a warning from guice-servlet
> -----------------------------------------------------
>                 Key: SHIRO-318
>                 URL:
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Jared Bunting
> We see this:
> Aug 5, 2011 12:28:49 PM
> get
> WARNING: You are attempting to use a deprecated API (specifically,
> attempting to @Inject ServletContext inside an eagerly created
> singleton. While we allow this for backwards compatibility, be warned
> that this MAY have unexpected behavior if you have more than one
> injector (with ServletModule) running in the same JVM. Please consult
> the Guice documentation at
> for more
> information.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message