Why does RMIRegistry needs Stub class?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sreenath_reddy
Posted On:   Wednesday, November 28, 2007 12:25 AM

Registry should contain the information about the server address and the object address in the server JVM.
When client invokes the look up it gets the address and the stub will use this address to call the methods in the remote object because the stub on client will have the equivalent methods.Then why does the registry needs stub?

Re: Why does RMIRegistry needs Stub class?

Posted By:   Robert_Lybarger  
Posted On:   Wednesday, November 28, 2007 08:54 AM

If the rmiregistry were not holding onto a pointer (reference) to a live, working object in memory then how would it know which object should have method calls invoked on them? And if the client didn't get some sort of a remote-reference to the same object from the rmiregistry, then upon what would it make method calls in the first place?
About | Sitemap | Contact