I am struggling with how to implement configuration contribution. By 
configuration contribution I simply mean
having a service being created *after* all modules have contributed their 
share to a certain configuration.

For example having a database module generating a configuration object and 
two other modules providing additional 
information by taking the Configuration object and manipulate it. When the 
final Database instance is created all those
modules have contributed their configuration changes to the Configuration 
instance used by the Database instance to 
initialize itself.

DatabaseModule {

   1. configuration = new Configuration()
   2. configuration.setDefaults();

   3. new Database(configuration)
}

ModuleA requires DatabaseModule {
    configuration.setDatabaseUrl("....");
}

ModuleB requires DatabaseModule {
    configuration.setUsernameAndPassword("user", "password");
}


Thats just a made up example but I need such pattern very often where you 
have to configure a kind of builder
or build receipt that is turned into the actual singleton or per thread 
scoped object.

Any idea how to achieve this? I need to use custom objects as build receipt.


Cheers,

Martin (Kersten),
Germany

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