Thanks Jesse. I think I will just try to avoid injecting the injector in the first place.
On Jun 9, 8:34 pm, "[email protected]" <[email protected]> wrote: > On Jun 9, 8:40 am, Dmitry Skavish <[email protected]> wrote: > > > 1) A binding to guice.test2.A was already configured at > > guice.test2.AFactory.create(). > > Gotcha. I'm actually glad that's it's a createChildInjector() thing. > If it wasn't this, I had absolutely no idea what could be causing a > duplicate bindings error! > > The fix is crude, but it should work. In your AImpl constructor, just > use "Injector.getParent()" rather than "Injector" to create a child > off of. You want to create an injector that's a sibling of the throw- > away injector uses by assisted inject. Alternatively, you could do > assisted injection "by hand" by writing your own factory > implementation (and not using FactoryProvider in a binding). > > I gotta admit that injecting-the-injector was definitely not on my > mind when we wrote this new feature; I'm sorry the API is clumsy for > doing this! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" 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?hl=en -~----------~----~----~----~------~----~------~--~---
