If you always want to use h2, you could just simply build the string using
https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#getenv--?
If you wanted to inject different JPA providers, you could certainly use
Guice for that (since you posted here) - I have a HibernateSessionFactory
Hi,
I am configuring my servlets with Guice (a joy!), but ran into this
little problem: I want to map a GenericServlet (one that extends
com.caucho.hessian.server.HessianServlet, so I cannot simply opt for
changing it) rather than a HttpServlet.
How can I do that? The ServletKeyBindingBuilder
Hi,
Sometimes it can be very convenient to just do
injector.getInstance(InjectedObject.class), for instance if you have a
object you don't need to be able to mock, but want to send a
dependency that you _would_ be like to be able to mock[1]. Currently I
do this by setting a global reference to
for the samples given), though. Thanks.
-S-
On Nov 4, 9:07 pm, Sondre Bjornebekk sondre.bjorneb...@gmail.com
wrote:
Hi,
Sometimes it can be very convenient to just do
injector.getInstance(InjectedObject.class), for instance if you have a
object you don't need to be able to mock, but want to send
, NamedCacheLocal)
.build(Key.get(NamedCache.class,
AlwaysCreatesNewInstances.class));
}
}
That should do the trick.
-Fred
On Thu, Oct 14, 2010 at 4:25 AM, Sondre Bjornebekk
sondre.bjorneb...@gmail.com wrote:
Hi,
Trying to use assisted inject and find it pretty neat, the minor
Hi,
Trying to use assisted inject and find it pretty neat, the minor
detail is that it does not quite work for me yet :-)
I have created a Map wrapper to ease switching of caches (typically to
something like Coherence) for my application. I want the Map to be
returned in a Singleton scope, based