Originally posted by James Frankman:
If the client is on a remote host, how does the client know where the server is? Is this done in the initialcontext. Is there some setting file you need to setup?
Hi James!
Yes, it's done in the InitialContext. If you look at the InitialContext, it can take a Properties object with information about your remote server as an argument. These settings aren't the same for every app. server, so
you should consult your container vendor's manual.
Actually you're locating a remote JNDI service this way.
Here's an example client code for JBoss:
I've omitted exception handling in this example. "YOUR_SERVER_IP_COMES_HERE" could be also: localhost!
Andor
[ August 08, 2007: Message edited by: Andor Nemeth ]