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.
    Author:
    $Id: 673da73d8a10020e79c2e21a53e7689b6cdb4348 $
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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