com.google.inject.jndi

Class JndiIntegration



  • public class JndiIntegration
    extends Object
    Integrates Guice with JNDI. Requires a binding to Context.
    Author:
    crazybob@google.com (Bob Lee)
    • 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:..."));
         

Copyright © 2006–2018 Google, Inc.. All rights reserved.