I have read some of the older posts here to clear my doubts...
https://coderanch.com/t/430129/Distributed-Java/java/Small-UnicastRemoteObject
https://coderanch.com/t/422569/Distributed-Java/java/UnicastRemoteObject-class-Remote-Interface
In the Sun API also its written that:
Used for exporting a remote object with JRMP and obtaining a stub that communicates to the remote object.
My question is:
1.
When we bind the object of this class in the rmi registry on server side, we do:
This binds the remote object "stub" or simply the remote object with the name "stub_object" in the rmi registry ?
2. On client side when we do:
Here the client gets the stub to the remote object according to the spec. But...
The remote object is obj. We are binding the remote object and not the stub to the registry, so the client should also get the remote object upon lookup. How does the client get the stub to the remote object, upon lookup? At what point of time stub (object) of the remote object is made- while binding the remote object to the registry or when the client does lookup?
I think I am missing something here...
3. When we are explicitly binding the remote object (dunno whether remote object is bound or stub object) to the rmi registry so that all the clients in the network can access this object then why there is need to explicitly export the remote object.