package WEB-INF.classes.wenrgise.common.utility;

import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;

public class WorkFlowContextProvider {
  private Context ctx = null;
  
  public static InitialContext localContext;
  
  private static wenrgise.common.utility.WorkFlowContextProvider objContextProvider = new wenrgise.common.utility.WorkFlowContextProvider();
  
  private WorkFlowContextProvider() {
    try {
      Hashtable env = new Hashtable();
      env.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
      env.put("java.naming.provider.url", "iiop://tcs093390:2811");
      this.ctx = new InitialContext(env);
    } catch (Throwable e) {
      e.printStackTrace();
    } 
  }
  
  public static Context getContext() {
    return objContextProvider.ctx;
  }
  
  public static InitialContext getLocalContext() {
    return localContext;
  }
}
