I'm guessing you're not using the servlet support that exists for Guice for 
some reason?

The whole child injector thing is overkill - what you want is a Guice Scope 
with the missing things bound in that scope.  

Have a look at this - https://github.com/timboudreau/scopes - which I use 
in an async http framework - in particular it lets you wrapper an 
ExecutorService so that the scope contents are "frozen" when you submit a 
Runnable/Callable, and the scope is reentered and reconstituted before your 
Runnable/Callable is run - so you can dispatch work to other threads (there 
is also AbstractScope.wrap() which will give you back a Runnable or 
Callable to do that for you).

In short, however you do it, setting up a whole Guice environment for the 
rest of the objects is probably not what you want.

-Tim

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to