JNDIContextManager
Date: 2016-06-25

org.osgi.service.jndi

## 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.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.naming.Context` | `newInitialContext()` Creates a new JNDI initial context with the default JNDI environment properties.
    `javax.naming.Context` | `newInitialContext(java.util.Map environment)` Creates a new JNDI initial context with the specified JNDI environment properties.
    `javax.naming.directory.DirContext` | `newInitialDirContext()` Creates a new initial DirContext with the default JNDI environment properties.
    `javax.naming.directory.DirContext` | `newInitialDirContext(java.util.Map environment)` Creates a new initial DirContext with the specified JNDI environment properties.

- - ### Method Detail

    - #### newInitialContext

          javax.naming.Context newInitialContext()
                                                 throws javax.naming.NamingException

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

    - #### newInitialContext

          javax.naming.Context newInitialContext(java.util.Map environment)
                                                 throws javax.naming.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:
        `javax.naming.NamingException` - upon any error that occurs during context creation

    - #### newInitialDirContext

          javax.naming.directory.DirContext newInitialDirContext()
                                                                 throws javax.naming.NamingException

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

    - #### newInitialDirContext

          javax.naming.directory.DirContext newInitialDirContext(java.util.Map environment)
                                                                 throws javax.naming.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:
        `javax.naming.NamingException` - upon any error that occurs during context creation