[jboss-user] [JNDI/Naming/Network] - Re: Why does jbossall-client.jar cause
waynebaylor
do-not-reply at jboss.com
Fri Aug 17 13:50:34 EDT 2007
fortunately you don't need the jnp-client.jar to do that. try this:
Properties p = new Properties();
| p.put(Context.INITIAL_CONTEXT_FACTORY,
| "org.jnp.interfaces.NamingContextFactory");
| p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
| p.put(Context.PROVIDER_URL, "192.168.bl.ah:1099");
|
| Context ctx = new InitialContext(p);
|
| MyRemote bean = (MyRemote)ctx.lookup("the jndi name");
if you are looking up a bean from the same server, then you can just do:
Context ctx = new InitialContext();
|
| MyRemote bean = (MyRemote)ctx.lookup("the jndi name");
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075309#4075309
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075309
More information about the jboss-user
mailing list