Menu

#2 a friend's advise about JFox/JNDI's test

open
nobody
None
5
2002-07-28
2002-07-28
Allen
No

public final static String HOST = "localhost";

Only support local rmi is unreason, able to access same
namespace,

IP need to be dynamic ip address,

public static String strURL = "rmi://127.0.0.1:9000";
public static Context getInitialContext() throws Exception
{
Hashtable env = new Hashtable(5, 0.75f);
env.put
(Context.INITIAL_CONTEXT_FACTORY, "com.sigama.kylin.j
ndi.InitialContextFactory");
env.put(Context.PROVIDER_URL, strURL);
return new InitialContext(env);
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB