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

I have a sort of messaging application which has his own interface and 
lauch the messaging service on the back ground. But then it can also lauch 
a tracing service which has his own gui. We have a buch of other service 
that help either to visual, create some dummy agent to participate in the 
messaging for testing purpose and etc... 

Either you create new injector specific to the different part of the app, 
or .....one injector at first, but that would be too much i guess. 



On Saturday, November 16, 2013 1:15:10 PM UTC+1, scl wrote:
>
> creating an injector is not the cheapest operation. 
> guice is ment to create an injector at startup and then reuse this 
> single injector during the entire lifetime of the application 
>
>
> On 11/16/2013 01:08 PM, Maatary Okouya wrote: 
> > Yes indeed, whenever I need it and I am fine with that, the problem is 
> that the code you wrote pre suppose that an external activities create an 
> injector and ask for the object with the field defined as you wrote. 
> > 
> > My question is more related to creating an injector each time. 
> > 
>
>

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