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.

Version:
$Revision: 999771 $

Method Summary
 Context newInitialContext()
          Creates a new JNDI initial context with the default JNDI environment properties.
 Context newInitialContext(Map<?,?> environment)
          Creates a new JNDI initial context with the specified JNDI environment properties.
 DirContext newInitialDirContext()
          Creates a new initial DirContext with the default JNDI environment properties.
 DirContext newInitialDirContext(Map<?,?> environment)
          Creates a new initial DirContext with the specified JNDI environment properties.
 

Method Detail

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<?,?> 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<?,?> 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


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.