Comment by [email protected]:

A better pattern to use when dealing stateful objects that require dependencies is create a singleton factory. It contains the necessary dependencies, and has a method that takes in the state that the stateful object requires. You can mock out the factory, ignore what should be transparent DI in the test, and avoid mixing scopes.

For more information:
http://code.google.com/p/google-guice/wiki/Scopes

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