com.google.inject.jndi
Class JndiIntegration

java.lang.Object
  extended by com.google.inject.jndi.JndiIntegration

public class JndiIntegration
extends Object

Integrates Guice with JNDI. Requires a binding to Context.


Method Summary
static
<T> Provider<T>
fromJndi(Class<T> type, String name)
          Creates a provider which looks up objects in JNDI using the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromJndi

public static <T> Provider<T> fromJndi(Class<T> type,
                                       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:..."));