The InitialContextFactory has 2 sets of methods, one for getting
javax.naming.InitialContext
instances for use with
naming services and one for getting
javax.naming.directory.InitialDirContext
instances
for use with directory services. There are
3 methods in each set, one for getting a context using solely configuration
to populate the environment properties, one for getting a context where some
environment properties can be programatically specified and the rest are supplied via
configuration, and one where all environment properties are specified programmatically.
Getting InitialContexts
// Gets a new InitialContext instance with evironment values that come from
// the service's configuration.
InitialContext getContext() throws NamingException;
// Gets a new InitialContext instance with evironment values that come
// from the service's configuration, but environment values can also
// be passed via the environment parameter to augment or override the
// values stored in configuration.
InitialContext getContext(Map environment) throws NamingException;
// Gets a new InitialContext with environment values given in the
// evironment parameter. The service's configuration is ignored.
InitialContext getContextIgnoreConfig(Map environment) throws NamingException;
Getting InitialDirContexts
// Gets a new InitialDirContext instance with evironment values that come from
// the service's configuration.
InitialContext getDirContext() throws NamingException;
// Gets a new InitialDirContext instance with evironment values that come
// from the service's configuration, but environment values can also
// be passed via the environment parameter to augment or override the
// values stored in configuration.
InitialContext getDirContext(Map environment) throws NamingException;
// Gets a new InitialDirContext with environment values given in the
// evironment parameter. The service's configuration is ignored.
InitialContext getDirContextIgnoreConfig(Map environment) throws NamingException;