/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */

package org.jfox.jndi;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class InitialContextHelper {
    private static volatile Context initCtx;

    public static Context getInitialContext() {
        if(initCtx == null) {
            try {
                initCtx = new InitialContext();
            }
            catch(NamingException e) {
                e.printStackTrace();
            }
        }
        return initCtx;
    }

    public static void main(String[] args) {

    }
}
