This content has been marked as final.
Show 1 reply
-
1. Re: clients and jndi, i dont have a clue!
ibruell May 18, 2004 3:36 AM (in response to pokey909)Have you tried to use the jndi.properties file ?
In my client classes i always use this code snippet:Properties prop = new Properties(); prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); prop.put(Context.PROVIDER_URL, "jnp://localhost:1099"); prop.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); InitialContext ctx = new InitialContext(prop); BeanHome home = javax.rmi.PortableRemoteObject.narrow(ctx.lookup("[BeanName]", BeanHomeClass.class);
Hope that helps.