OSGi™ Service Platform
Release 4 Version 4.2

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.

ThreadSafe

Method Summary
 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

OSGi™ Service Platform
Release 4 Version 4.2

Copyright © OSGi Alliance (2000, 2010). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0