Hi,
I am a bit confused with the term "Location Transparency".
The definition states that "the client code is unaware of whether the EJB object it is using is located on a machine next door or a machine across the internet."
This just talks about the EJB object, but what about the EJBHome object. For the EJBHome object we do make a JNDI lookup wherein we specify the machine (location), along with certain other parameters.
So the client does indeed know about the location.
-
Location Transperency (2 messages)
- Posted by: Rahul Gokhale
- Posted on: December 10 2002 05:41 EST
Threaded Messages (2)
- Location Transperency by Ferhat SAVCI on December 10 2002 07:25 EST
- Location Transperency by SundaraRajan Krishnamoorthy on December 10 2002 08:02 EST
-
Location Transperency[ Go to top ]
- Posted by: Ferhat SAVCI
- Posted on: December 10 2002 07:25 EST
- in response to Rahul Gokhale
The JNDI lookup returns a reference to the home object, not the home object itself. The reference encapsulates the location (ip, port etc.) of the object. The returned reference is most likely a stringified-IOR, a hex dump of the variable length structure keeping the object location.
It is like calling someone whose phone number you don't remember: you first dial a service number to connect to an operator who gives you the area code and the phone number for that person (JNDI lookup), then you dial the area code and the phone number to connect to the person (narrow).
The client does not know where the object is, but it knows the location of a directory service where the location of the object may be found. -
Location Transperency[ Go to top ]
- Posted by: SundaraRajan Krishnamoorthy
- Posted on: December 10 2002 08:02 EST
- in response to Rahul Gokhale
Hi,
The answer is there in your question itself. In order to access a home object, you always do a JNDI lookup. The JNDI lookup machanism hides the location of the home object. If the location of the EJBHome object gets changed, it need to get updated in the JNDI tree and the client program is not affected atall. Hence the term "Location Transparency" sounds valid. Note the client needs to know the location of the JNDI tree, but not the location of the remote object.
Regards
Sundar.