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

      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<java.lang.String,​?> 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<java.lang.String,​?> 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<java.lang.String,​?> 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<java.lang.String,​?> 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