On Tue, Dec 20, 2016 at 1:07 PM, Greg Methvin <[email protected]> wrote:
> So would you say I shouldn't worry about the cost of creating child > injectors on every request? I sort of like this approach. Having to > transfer state between thread locals seems error-prone. > Correct. Child injectors were designed with this very use case in mind. Of course, you'll want to avoid slow operations in your request-scoped modules. Child injectors are less error prone than Scopes because they make it impossible for an object in a larger scope to directly reference an object in a smaller scope (for example, a global singleton can't be injected with a request-scoped object). Bob -- 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 https://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAGmsiP4Stf2KZtE%3De85GCzUVNuNxj8DSg-2y5Kg%2BTHfKmJaYzQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
