On Mon, Aug 22, 2011 at 11:14 AM, Ashwin Jayaprakash <
[email protected]> wrote:

>
>    - Does constructor injection use reflection all the time or is there an
>    option to switch to bytecode generation?
>
> Reflection, but it's very fast.

>
>    - Is there a way to discard/shutdown the singletons? I saw 
> Issue-62<http://code.google.com/p/google-guice/issues/detail?id=62>and this 
> seems to have been open since 2007 !!
>       - How do you shutdown a module and restart it - example, when it has
>       seen network/DB/JMS errors?
>
> Guiceyfruit supports @PreDestroy: http://code.google.com/p/guiceyfruit/

>
>    -
>    - Can multiple Injector instances be created?
>       - This would be useful for running multiple versions of the module
>       in parallel
>       - Or at least for module-level testing, I felt the need for starting
>       the same module with different configurations
>
> Yes.


>
>    - Why isn't there a way to get the Injector from the Guice class? After
>    creating the Injector, I had to store a reference to it in a singleton
>    class' static field
>       - This singleton-for-the-Injector kind of defeated the purpose of
>       the whole thing. I was beginning to think that a simple 
> Registry/Factory of
>       my own would've accomplished many of these things
>
> You typically shouldn't use Injector directly after the initial lookup.
When you depend on types, Guice can check your dependencies up front. When
you get objects directly form the Injector, you don't find out about missing
deps until run time.

Bob

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

Reply via email to