communicating to the ejb server through a network
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aditya_Mehta
Posted On:   Monday, September 6, 2004 11:59 AM


an ejb server has been deployed on the j2ee server on a computer on the network. how can i call a method of the remote interface using the client program on a different computer on the network?

Re: communicating to the ejb server through a network

Posted By:   Raj_Subramani  
Posted On:   Tuesday, September 7, 2004 01:06 AM

Remeber when you did your unit test on the same machine (or did you?), you set the (Hashtable) env variables as follows:




env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");




(The above is for JBoss, since you do not mention a container. Other containers would not deviate too far from this)



Looking at PROVIDER_URL, the rest (as they say) is "elementary"



Cheers

-raj

About | Sitemap | Contact