For 1. You could probably use MultiBinder or MapBinder http://code.google.com/p/google-guice/wiki/Multibindings
On Tue, Aug 11, 2009 at 3:48 AM, Max Bowsher <[email protected]> wrote: > > Hi, > > I've seen Names.bindProperties(...) and thought that it could be a > neat way of managing configuration using guice. > > On further thought, however, I realized I had some problems: > > 1. Some of my configuration values are multi-value - i.e. I'd need to > inject a List or Map > > 2. Some of my configuration consists of applying different sets of > values to different instances of the same class, identified by names - > e.g. mainThreadPool.maxSize = 10, someSpecificTaskPool.maxSize = 3. > > Item (1) could be dealt with by a suitable preprocessor interposed > between the Properties and the constant bindings installed by the > Module. > > Item (2) seems to be insurmountable without convoluting things quite a > lot. > > Does anyone have suggestions on how I should deal with this, or should > I just use Guice for assembly of the interdependent objects, and > inject configuration by a non-Guice method? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
