Comment #22 on 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

Keeping separation of concerns in mind, can you please explain what GuiceFilter and GuiceServletContextListener are meant to do, independently of one another?

I believe I answered this in an earlier comment (note: its just my personal view, I didn't design these classes)

* GuiceFilter is responsible for filtering requests/responses by using the pipeline(s) injected into it * GuiceServletContextListener is responsible for creating injectors on-demand that inject pipelines

So while there is a link between the two - one creates injectors, the other expects pipeline(s) to be injected - they could conceivably work independently, in that you could put in your own Filter implementation that just used the injector created and stashed in the context by the listener. Or you could write your own listener that used a different pipeline implementation (assuming the FilterPipeline type was opened up as in my patch).

Conversely, why should these classes be combined? They implement different interfaces that have no relation or reference to each other in the servlet spec, so combining them is imho purely an implementation detail to avoid a little bit of indirection.

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