Comment #13 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
mcculls,
Wouldn't you want to use a delegating approach, so you can handle multiple pipelines at the same time?
What does a delegating approach really mean in this case? I want to run multiple unit tests in parallel where each @Test method gets a separate Injector and web server to run against. A delegating approach sounds like we're saying: if server 1 cannot handle a request, server 2 should try to, then server 3 and so on. That sounds more like fail-over to me and doesn't really make sense for my unit test use-case.
Besides, afaict most people shouldn't have to extend GuiceFilter, and those that do need to extend it should know enough to be able to manage the two classes.
Agreed, which is why I'd prefer adding code to GuiceFilter that automatically tries grabbing a FilterPipeline from GuiceServletContextListener at init() time. If I understand your use-case correctly, you want to be able to modify the filter pipeline multiple times over the lifetime of the Filter (whereas I only want it set once). What we can do is have init() pick up reasonable defaults and add the setter method you proposed. This way both our use-cases are possible.
-- 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.
