Comment #4 on issue 559 by [email protected]: Problem using guice-servlet
in multiple war, when guice-servlet.jar is in ear's libraries
http://code.google.com/p/google-guice/issues/detail?id=559
Here is simple scenario:
ear
-APP-INF/lib/guice*.jar
-war1
-/servlet1
-war2
-/servlet2
both war1 and war2 have in its own web.xml defined GuiceFilter and class
which extends GuiceServletContextListener to define injector.
So even GuiceFilter is defined as a Singleton, two instances are created
(one for war1 and one for war2) by container (so they are not injected).
In this case, both instances shares same static servletcontext and same
static pipeline.
The simplest solution should be imho injecting members in GuiceFilter in
init method before pipelines are initialized.
Or maybe I am using it wrong way...
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.