001    /*
002     *  Licensed to the Apache Software Foundation (ASF) under one
003     *  or more contributor license agreements.  See the NOTICE file
004     *  distributed with this work for additional information
005     *  regarding copyright ownership.  The ASF licenses this file
006     *  to you under the Apache License, Version 2.0 (the
007     *  "License"); you may not use this file except in compliance
008     *  with the License.  You may obtain a copy of the License at
009     *  
010     *    http://www.apache.org/licenses/LICENSE-2.0
011     *  
012     *  Unless required by applicable law or agreed to in writing,
013     *  software distributed under the License is distributed on an
014     *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015     *  KIND, either express or implied.  See the License for the
016     *  specific language governing permissions and limitations
017     *  under the License. 
018     *  
019     */
020    package org.apache.directory.server.core.jndi;
021    
022    
023    import org.apache.directory.server.core.DirectoryService;
024    import javax.naming.InitialContext;
025    import javax.naming.spi.InitialContextFactory;
026    
027    
028    /**
029     * A server-side JNDI provider implementation of {@link InitialContextFactory}.
030     * This class can be utilized via JNDI API in the standard fashion:
031     * <p>
032     * <code>
033     * Hashtable env = new Hashtable();
034     * env.put( Context.PROVIDER_URL, "ou=system" );
035     * env.put(
036     * Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
037     * InitialContext initialContext = new InitialContext( env );
038     * </code>
039     * <p>
040     * Unfortunately, {@link InitialContext} creates a new instance of
041     * {@link InitialContextFactory} implementation everytime it is instantiated,
042     * so this factory maintains only a static, singleton instance of
043     * {@link DirectoryService}, which provides actual implementation.
044     * Please note that you'll also have to maintain any stateful information
045     * as using singleton pattern if you're going to extend this factory.
046     * <p>
047     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
048     * @version $Rev: 679219 $, $Date: 2008-07-24 00:45:05 +0200 (Thu, 24 Jul 2008) $
049     * 
050     * @see javax.naming.spi.InitialContextFactory
051     */
052    public abstract class AbstractContextFactory implements InitialContextFactory
053    {
054    }