Comment #21 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

Having given this some more thought, I believe using different ClassLoaders is more of a band-aid than a proper solution. One of the main selling points of Guice was that by migrating away from static factories we'd improve unit test isolation. This is precisely the problem we are encountering here.

I didn't say Guice shouldn't support this use-case (it's entirely possible with either patch) - I was making the point that your tests could always run into issues with other third-party libraries that rely on static members, because those tests are spinning up live servlet containers, etc. and not AFAIK performing any mocking.

So while Guice can certainly help you move away from static factories, it can't magically replace them in existing code - which is where mocking can help, because you then don't rely on having a live container.

Anyway, back to the original issue - it would be good to get Dhanji's view on this...

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