first commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package wenrgise.common.utility;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
public class WorkFlowContextProvider2 {
|
||||
private Context ctx = null;
|
||||
|
||||
public static InitialContext localContext;
|
||||
|
||||
private static WorkFlowContextProvider2 objContextProvider = new WorkFlowContextProvider2();
|
||||
|
||||
private WorkFlowContextProvider2() {
|
||||
try {
|
||||
Hashtable env = new Hashtable();
|
||||
env.put("java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
|
||||
env.put("java.naming.security.principal", "admin");
|
||||
env.put("dedicated.rmicontext", "true");
|
||||
env.put("java.naming.security.credentials", "welcome");
|
||||
env.put("java.naming.provider.url", "ormi://tcs041981:23892/current-workspace-app");
|
||||
this.ctx = new InitialContext(env);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static Context getContext() {
|
||||
return objContextProvider.ctx;
|
||||
}
|
||||
|
||||
public static InitialContext getLocalContext() {
|
||||
return localContext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user