This content has been marked as final.
Show 2 replies
-
1. Re: InitialContext
bbalmer Feb 17, 2004 9:12 AM (in response to walter)How about:
String IP = ?;
String PORT = ?;
Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, IP + ":" +PORT );
props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
Context jndiContext = new InitialContext(props); -
2. Re: InitialContext
acoliver Feb 17, 2004 9:28 AM (in response to walter)Context naming = new InitialContext(); should do the trick within jboss. You do not need to/shold not provide properties in that case. However if you mean remotely, you should supply a jndi.properties file in the classpath first. Or you can do as the poster suggested below, the jndi properties gives you less rigid code. http://jboss.org/wiki/Wiki.jsp?page=AccessEJBsRemotely