[jboss-user] [EJB 3.0] - Re: local jboss accessing EJB's deployed in remote jboss

jaikiran do-not-reply at jboss.com
Thu Aug 7 03:08:18 EDT 2008

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://"); //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");

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169204#4169204

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169204

More information about the jboss-user mailing list