Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBs and Location transparency

 
Saeed Amer
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi authors and fellow ranchers,

It is claimed that one of the benefits of using EJBs is that they provide/support Location Transparency. I am not too sure what exactly this means. In case of EJBs that expose Local interfaces, client and the EJBs are co-located (in the same JVM) - so location is NOT transparent (client precisely knows where the EJBs are located). Even in case of EJBs that only expose Remote Interfaces, client has to do a JNDI lookup in order to obtain EJBHome stub (and hence EJBObject stub). And to perform a JNDI lookup, client needs IP. And having known the IP, location is not transparent anymore.

Am I missing something or is it that I am incorrectly interpreting the meanings of 'location transparency for EJBs'?

Thanks in advance
Saeed
 
paresh vernekar
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Local interfaces donot support location transparency.It is the remote interfaces that do so.You need to know the JNDI name and the IP.The IP is address of the naming server not of the bean.The EJB application maybe deployed at some other point in the network and the beans maybe configured using JNDI to the naming server.This is the IP that you need to.
Regards,
Paresh Vernekar
 
Joy Mookerji
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In any kind of TCP/IP communications you need to know the IP Address of the Server to communicate with its services.
Simple socket applications also require client to know the IP address of the server.


EJB uses RMI-IIOP protocol which is developed on TCP/IP.

So any application who needs to communicate with services provided need to bind to the server.
As pointed out before the exact location of the bean is transparent to the client and we have to do a JNDI lookup to get the home-interface and comunicate with the beans through the EJBObject.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic