Comment by blaine.dev:

Could you connect the dots in _How do I inject configuration parameters?_, and show how a runtime *value* for `fooServerAddress` can actually be set... as that is the point of the whole thing?

In all other examples, the Module and Injector are created in the "_client class_". I am left to infer that either you are assuming without explanation the existence of another class that fulfills the role of *client class* in your other examples, or that a static method (perhaps main) does this before instantiating a `FooClient`. The Injector setup can't be done inside the FooClient iself, since it depends on Guice injection for its own instantiation.

As the Module constructor takes a `fooServerAddress` param itself and appears to not be injected, and you have said nothing about nested Injectors, I hope I can assume that the runtime `fooServerAddress` *value* would be added by a traditional, procedural `new` of the Module: `new FooModule("runtimeAddr")`? If that is so, it looks like `Names.bindProperties(Binder, Properties)` is the only assistance Guice gives to facilitate scalable and declarative runtime configuration settings... that's pitiful compared to what Spring has had for 7 years.

For more information:
http://code.google.com/p/google-guice/wiki/FrequentlyAskedQuestions

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev?hl=en.

Reply via email to