org.apache.directory.server.core.jndi
Class AbstractContextFactory

java.lang.Object
  extended by org.apache.directory.server.core.jndi.AbstractContextFactory
All Implemented Interfaces:
javax.naming.spi.InitialContextFactory

public abstract class AbstractContextFactory
extends java.lang.Object
implements javax.naming.spi.InitialContextFactory

A server-side JNDI provider implementation of 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.

Version:
$Rev: 679219 $, $Date: 2008-07-24 00:45:05 +0200 (Thu, 24 Jul 2008) $
Author:
Apache Directory Project
See Also:
InitialContextFactory

Constructor Summary
AbstractContextFactory()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.naming.spi.InitialContextFactory
getInitialContext
 

Constructor Detail

AbstractContextFactory

public AbstractContextFactory()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.