Class JndiBeanRepository

java.lang.Object
org.apache.camel.support.jndi.JndiBeanRepository
All Implemented Interfaces:
org.apache.camel.spi.BeanRepository

public class JndiBeanRepository extends Object implements org.apache.camel.spi.BeanRepository
A BeanRepository implementation which looks up the objects in JNDI
  • Constructor Details

    • JndiBeanRepository

      public JndiBeanRepository()
    • JndiBeanRepository

      public JndiBeanRepository(Map<?,?> environment)
    • JndiBeanRepository

      public JndiBeanRepository(Context context)
    • JndiBeanRepository

      public JndiBeanRepository(boolean standalone)
      Whether to use standalone mode, where the JNDI initial context factory is using CamelInitialContextFactory.
  • Method Details

    • lookupByNameAndType

      public <T> T lookupByNameAndType(String name, Class<T> type)
      Specified by:
      lookupByNameAndType in interface org.apache.camel.spi.BeanRepository
    • lookupByName

      public Object lookupByName(String name)
      Specified by:
      lookupByName in interface org.apache.camel.spi.BeanRepository
    • findByTypeWithName

      public <T> Map<String,T> findByTypeWithName(Class<T> type)
      Specified by:
      findByTypeWithName in interface org.apache.camel.spi.BeanRepository
    • findByType

      public <T> Set<T> findByType(Class<T> type)
      Specified by:
      findByType in interface org.apache.camel.spi.BeanRepository
    • close

      public void close() throws NamingException
      Throws:
      NamingException
    • getContext

      public Context getContext() throws NamingException
      Throws:
      NamingException
    • setContext

      public void setContext(Context context)
    • createContext

      protected Context createContext() throws NamingException
      Throws:
      NamingException