Package 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
Modifier and TypeMethodDescriptionCreates a new JNDI initial context with the default JNDI environment properties.newInitialContext
(Map<String, ?> environment) Creates a new JNDI initial context with the specified JNDI environment properties.Creates a new initial DirContext with the default JNDI environment properties.newInitialDirContext
(Map<String, ?> environment) Creates a new initial DirContext with the specified JNDI environment properties.
-
Method Details
-
newInitialContext
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
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
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
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
-