Having been using Guice for a while I still cannot decide what is the best way to pass properties to Guice modules.
One of examples that really bothers me is "com.google.inject.persist.jpa.JpaPersistModule" in guice-persist that has a "properties" setter method. This kind of design requires me to have an exact instance of JPA connection properties at the time of module creation. Doesn't this violate the whole idea of dependency injection? These properties can come from external sources and be bound by another module - this makes perfect sense to me. Surely one can have a workaround (with parent injectors for example), but the question remains - why such design decision was made in the first place? Maybe I'm missing something important? Is there any "best practice" or "recommended" approach for such cases? -- 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.
