Package com.google.inject.jndi
Class JndiIntegration
- java.lang.Object
-
- com.google.inject.jndi.JndiIntegration
-
public class JndiIntegration extends java.lang.Object
Integrates Guice with JNDI. Requires a binding toContext
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Provider<T>
fromJndi(java.lang.Class<T> type, java.lang.String name)
Creates a provider which looks up objects in JNDI using the given name.
-
-
-
Method Detail
-
fromJndi
public static <T> Provider<T> fromJndi(java.lang.Class<T> type, java.lang.String name)
Creates a provider which looks up objects in JNDI using the given name. Example usage:bind(DataSource.class).toProvider(fromJndi(DataSource.class, "java:..."));
-
-