This content has been marked as final.
Show 2 replies
-
1. Re: local jboss accessing EJB's deployed in remote jboss
jaikiran Aug 7, 2008 3:08 AM (in response to zhuhuapeng)All you have to do is, use the correct JNDI properties and the jndi-name for the EJB lookup. Something like:
Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); props.put(Context.PROVIDER_URL,"jnp://10.0.0.10:1099"); //1099 is the default. change the port number appropriately. props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming.jnp.interfaces"); Context ctx = new InitialContext(props); MyBeanRemoteInterface bean = (MyBeanRemoteInterface) ctx.lookup("TheJNDINameOfTheBeanOnRemoteServer");
-
2. Re: local jboss accessing EJB's deployed in remote jboss
zhuhuapeng Aug 7, 2008 9:35 PM (in response to zhuhuapeng)yes ,i tried it again by this way and it can runs well now .
thank you.