Top Description Methods
org.osgi.service.jndi

public Interface JNDIContextManager

Imports
java.util.Map, javax.naming.Context, .NamingException, javax.naming.directory.DirContext

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: 5fecc446eb2be010da62b7d5b5cff9f93924822a $

Method Summary

Modifier and TypeMethod and Description
public Context

Returns:

an instance of javax.naming.Context
newInitialContext
()

Creates a new JNDI initial context with the default JNDI environment properties.

public Context

Returns:

an instance of javax.naming.Context
newInitialContext
(Map<String, ?>
JNDI environment properties specified by caller
environment
)

Creates a new JNDI initial context with the specified JNDI environment properties.

public DirContext

Returns:

an instance of javax.naming.directory.DirContext
newInitialDirContext
()

Creates a new initial DirContext with the default JNDI environment properties.

public DirContext

Returns:

an instance of javax.naming.directory.DirContext
newInitialDirContext
(Map<String, ?>
JNDI environment properties specified by the caller
environment
)

Creates a new initial DirContext with the specified JNDI environment properties.

Method Detail

newInitialContextback to summary
public Context newInitialContext() throws NamingException

Creates a new JNDI initial context with the default JNDI environment properties.

Returns:Context

an instance of javax.naming.Context

Exceptions
NamingException:
upon any error that occurs during context creation
newInitialContextback to summary
public Context newInitialContext(Map<String, ?> environment) throws NamingException

Creates a new JNDI initial context with the specified JNDI environment properties.

Parameters
environment:Map<String, ?>

JNDI environment properties specified by caller

Returns:Context

an instance of javax.naming.Context

Exceptions
NamingException:
upon any error that occurs during context creation
newInitialDirContextback to summary
public DirContext newInitialDirContext() throws NamingException

Creates a new initial DirContext with the default JNDI environment properties.

Returns:DirContext

an instance of javax.naming.directory.DirContext

Exceptions
NamingException:
upon any error that occurs during context creation
newInitialDirContextback to summary
public DirContext newInitialDirContext(Map<String, ?> environment) throws NamingException

Creates a new initial DirContext with the specified JNDI environment properties.

Parameters
environment:Map<String, ?>

JNDI environment properties specified by the caller

Returns:DirContext

an instance of javax.naming.directory.DirContext

Exceptions
NamingException:
upon any error that occurs during context creation