wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Calling EJB from a different Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Calling EJB from a different Server" Watch "Calling EJB from a different Server" New topic
Author

Calling EJB from a different Server

Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
Hi
Can someone plz tell me how to make call to the EJB from a different server. I have two machines both with App Server running on. Want to call an EJB hosted on machine A from machine B. No clusters, just independant servers on a network.
Thanks
GUL
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
The only difference to using an EJB from the same server, you need to obtain a remote JNDI context instead of doing "new InitialContext()".


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Hari babu
Ranch Hand

Joined: Jun 25, 2001
Posts: 208
Hi,
In continuatation with the above post, My EJB "b" is deployed only on server B, and there is no mention of the EJB classes "b" in my server "A" (in A's classpath) and now the server A has to download the class files (class files of Bean "b") from server "B", for this to happen do i need to set anything special in my classpath as we do it in RMI for dynamic loading of classes ?
Hari
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Calling EJB from a different Server