javax.naming.spi
Interface InitialContextFactory


public interface InitialContextFactory

Defines a factory that creates the initial context for the beginning of the name resolution. JNDI allows to specify different implementations of the initial context at runtime.

The class, implementing this interface, must be public and have a public parameterless constructor


Method Summary
 Context getInitialContext(Hashtable<?,?> environment)
          Create a new initial context
 

Method Detail

getInitialContext

Context getInitialContext(Hashtable<?,?> environment)
                          throws NamingException
Create a new initial context

Parameters:
environment - the properties, used when creating the context. The implementing class will not modify the table nor keep the reference to it. After the method returns, the caller can safely reuse the table for other purposes.
Returns:
the new initial context
Throws:
NamingException - if the naming exception has occured