Paul Sandoz wrote:
>
> That looks rather good. One comment why are you using a static field
> in GuiceServlet:
>
> private static Injector injector;
>
> that means you cannot have two or more GuiceServlet instances deployed
> in the same Web server.
>
> Are you satisfied that this meets most of your requirements? if so do
> you consider it worth contributing to the Jersey code base?
That's precisely what I had in mind. You are welcome to commit this to the
Jersey code-base. Here is an updated version of GuiceServlet with a
non-static injector.
http://n2.nabble.com/file/n1577058/GuiceServlet.java GuiceServlet.java
I will need to update this code slightly when Guice 2.0 comes out (it throws
different exceptions in one place).
PS: The old SPI required me to implement NamedInjectable or something in
order to be able to inject into method parameters. Is this still needed?
Gili
--
View this message in context: http://n2.nabble.com/Simplifying-Jersey-life-cycle-and-IoC-integration-tp1367641p1577058.html
Sent from the Jersey mailing list archive at Nabble.com.