public abstract class AbstractContextFactory extends Object implements InitialContextFactory
InitialContextFactory
.
This class can be utilized via JNDI API in the standard fashion:
Hashtable env = new Hashtable();
env.put( Context.PROVIDER_URL, "ou=system" );
env.put(
Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
InitialContext initialContext = new InitialContext( env );
Unfortunately, InitialContext
creates a new instance of
InitialContextFactory
implementation everytime it is instantiated,
so this factory maintains only a static, singleton instance of
DirectoryService
, which provides actual implementation.
Please note that you'll also have to maintain any stateful information
as using singleton pattern if you're going to extend this factory.
InitialContextFactory
Constructor and Description |
---|
AbstractContextFactory() |
public AbstractContextFactory()
Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.