Use the IP address of your EJB container.
If you are using JNDI:
/**
* Setup properties for JDNI initialization.
*
* There properties will be read-in from the
* command-line
*/
Properties props = System.getProperties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
props.put(Context.PROVIDER_URL, "iiop://localhost:1050");
Replace the localhost the IP address of your EJB container, in my cause, I used the Sun J2EE Server 1.3 ( a fair old version of EJB container to get the job done.)
Regards,
Jiafan