When are you passing this string?
Is it part of you Giuce Module??
Could you read the environment variable before creating the string and than manually create the URL string?
--
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 google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/ed5b261c-62de-41b1-872f-7585ca134d0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@Provides
@RequestScoped
private Session provideSession() {
@Provides
@Singleton
private Session provideSession() {
public class TestGuiceModule extends AbstractModule
Only way you can try to achieve this is the methode:
JpaPersistModule.setProperties()
The properties passed in will be used to create the entity manager
factory (see JpaPersistService.start())
Maybe you can overwrite the URL in the properties you pass.
--
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 google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/359f8de0-3a51-4ca0-8209-50252d136788%40googlegroups.com.
Can't you simply do the following??
public class MyModule extends ServletModule {
protected void configureServlets() {
install(new
JpaPersistModule("myJpaUnit").setProperties(myProperties));
}
}
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/9089d9ce-3580-4a5b-97c6-e757484b2413%40googlegroups.com.