Status: New
Owner: ----

New issue 635 by [email protected]: GuiceFilter uses wrong instance of FilterPipeline if used with multiple servlet context and multiple injectors
http://code.google.com/p/google-guice/issues/detail?id=635

In short:

Servlet Container: Jetty 8.0.0 M3
Guice: 3.0 + Servlet Extension (3.0)

If i create multiple servlet context and configure each of them with a dedicated injector based on a dedicated servlet module, GuiceFilter aquires always the FilterPipeline according to the last added servlet context/injector - no matter which servlet context my HTTP request leads to.

e.g.

Servlet Context A (context path: /a)
Configured with dedicated GuiceFilter & GuiceServletContextListener providing Injector holding
    Servlet Module incl. serve("/hello", HelloAServlet.class)

Servlet Context B (context path: /b)
Configured with dedicated GuiceFilter & GuiceServletContextListener providing Injector holding
    Servlet Module incl. serve("/hello", HelloBServlet.class)

If i add mentioned context in listed order, i will always receive HelloBServlet.class, no matter if i invoke /hello/a - or /hello/b in my browser.

I did not spend much time yet to find a clean solution, but what i can say is that some debugging in GuiceFilter tells me that it somehow uses the wrong (Managed)FilterPipeline on request / GuiceFilter.doFilter - but it is associated to the correct servlet context.

So if (i know, not clean solution) i extend GuiceFilter.setPipeline to put the here given FilterPipeline (which is still correct at this time) into provided servlet context AND then use this pipeline again in GuiceFilter.doFilter - all problems are solved.


--
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.

Reply via email to