extensions/jndi/src/com/google/inject/jndi/JndiIntegration.java
public static <T> Provider<T> fromJndi(Class<T> type, String name) {
    return new JndiProvider<T>(type, name);
  }
public static <T> Provider<T> fromJndi(Class<T> type, String name) {
    return new JndiProvider<T>(type, name);
  }
Creates a provider which looks up objects in JNDI using the given name. Example usage:

<pre>
bind(DataSource.class).toProvider(fromJndi(DataSource.class, "java:..."));
</pre>