Here's how you can obtain a JNDI Context on a remote JNDI tree:
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
env.put(Context.SECURITY_PRINCIPAL, "myusername");
env.put(Context.SECURITY_CREDENTIALS, "mypassword");
Context ctx = new InitialContext(env); |
<< Back to JavaEnterpriseEditionFaq