Interface JNDIContextManager


public interface JNDIContextManager
This interface defines the OSGi service interface for the JNDIContextManager. This service provides the ability to create new JNDI Context instances without relying on the InitialContext constructor.
"ThreadSafe"
  • Method Details

    • newInitialContext

      Context newInitialContext() throws NamingException
      Creates a new JNDI initial context with the default JNDI environment properties.
      Returns:
      an instance of javax.naming.Context
      Throws:
      NamingException - upon any error that occurs during context creation
    • newInitialContext

      Context newInitialContext(Map<String,?> environment) throws NamingException
      Creates a new JNDI initial context with the specified JNDI environment properties.
      Parameters:
      environment - JNDI environment properties specified by caller
      Returns:
      an instance of javax.naming.Context
      Throws:
      NamingException - upon any error that occurs during context creation
    • newInitialDirContext

      DirContext newInitialDirContext() throws NamingException
      Creates a new initial DirContext with the default JNDI environment properties.
      Returns:
      an instance of javax.naming.directory.DirContext
      Throws:
      NamingException - upon any error that occurs during context creation
    • newInitialDirContext

      DirContext newInitialDirContext(Map<String,?> environment) throws NamingException
      Creates a new initial DirContext with the specified JNDI environment properties.
      Parameters:
      environment - JNDI environment properties specified by the caller
      Returns:
      an instance of javax.naming.directory.DirContext
      Throws:
      NamingException - upon any error that occurs during context creation