Hi guys,

Quick question from a newbie using Guice.. :)
I have the following module that I am using to persist my objects with db4o:

public class PersistenceModule extends AbstractModule {
    private static final Logger logger = 
LoggerFactory.getLogger(DefaultBootstrapModule.class);
    private static final String BOOKINGS_DATA = "./target/bookings.data";
    @Override
    protected void configure() {
        
install(PersistenceService.usingDb4o().across(UnitOfWork.TRANSACTION).buildModule());
        bindConstant().annotatedWith(Db4Objects.class).to(BOOKINGS_DATA);
    }
}

Is there any way to "provide" to this module the database name, for example 
injecting the value into the module? What is the correct approach/pattern 
for this case? 
The idea is to take this configuration parameter from a properties file. I 
have already an object that provides me these values from the property, but 
i cant find the way to inject it to this module. I dont know if its 
possible but i assume that is a pretty common use case, so i would like to 
know what is the best way to do it.

Thanks!




-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to