On Sat, Nov 16, 2013 at 9:07 AM, Maatary Okouya <[email protected]>wrote:

> I get it thanks. So the solution is to find a way to wire all your
> application at start, including with factory for subsequent use. But i
> beleive ultimately you will have to keep an instance of your injector and
> pass it around to the relevant class as necessary if required.
>

You should hardly ever need the injector except at start up. The only time
I have ever had to inject the injector was for a very specific case
involving reflection and where I was forced to instantiate the objects
myself.

I'm just trying to understand how people usually  use it. What i mean is
> that, for instance if you have a gui from which you can start some
> services, which may lauch some interface from which you can lauch other
> background services. You can't wire everything upfront obviously. isn't it.
>

Why not?

As long as you're in charge of how your app starts (whether it's a main, a
servlet container or an app server), you can inject anything you want.

-- 
Cédric

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