File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJBs and Location transparency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJBs and Location transparency" Watch "EJBs and Location transparency" New topic

EJBs and Location transparency

Saeed Amer
Ranch Hand

Joined: Jan 20, 2004
Posts: 140
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
paresh vernekar
Ranch Hand

Joined: Jul 10, 2006
Posts: 52
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.
Paresh Vernekar
Joy Mookerji
Ranch Hand

Joined: Jul 26, 2006
Posts: 49
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.

SCJP 5<br />Brainbench Certified in C++<br />PMP<br />Dallas,TX
I agree. Here's the link:
subject: EJBs and Location transparency
It's not a secret anymore!