Remote references equality.
1 posts in topic
Flat View  Flat View

Posted By:   Amir_Gourgy
Posted On:   Tuesday, June 12, 2001 02:47 PM

class A that is a remote object that extends UnicastRemoteObject
and implementes a dummy remote interface.

Class A is exported by a server.

What happens when a client has two remote references
,r1 and r2,to the same instance of class A.

Does r1.equals(r2). Does this cause a rmi call
and is this call safe/efficient?

Re: Remote references equality.

Posted By:   srinath_mandalapu  
Posted On:   Monday, June 25, 2001 02:45 PM

All stubs are inherited from "RemoteStub" which itself is inherited from "RemoteObject". RemoteObejct provides its own implementations for basic object semantics like "hasCode", "equals", "toString" etc. Stub internally contains a concrete implentation of "RemoteRef" object which basically contains the host, port and object id of the remote object it is refering. If two stubs are having references pointing to the same remote object (same host name, port and object id) which are considered as equal. "Equals" on stubs DOES NOT involve any remote call to the remote objects
About | Sitemap | Contact