File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJBs and Location transparency" Watch "EJBs and Location transparency" New topic
Author

EJBs and Location transparency

Saeed Amer
Ranch Hand

Joined: Jan 20, 2004
Posts: 135
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

Joined: Jul 10, 2006
Posts: 52
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

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: http://aspose.com/file-tools
 
subject: EJBs and Location transparency
 
Similar Threads
Differentiating how parameters are handled
Location transparency in EJB
Can we Achieve Location transparency in accessing database?
Location transparency in EJB?
WSAD 5.1.0 - JNDI - Resource Ref. Could Not Be Located.