How and when is a Remote object replaced by its stub?
Location: http://www.jguru.com/faq/view.jsp?EID=117854 Created: Aug 3, 2000 Modified: 2000-08-03 08:26:59.826 Author: Doug Bell (http://www.jguru.com/guru/viewbio.jsp?EID=113602) Question originally posed by Tim Rohaly PREMIUM (http://www.jguru.com/guru/viewbio.jsp?EID=10 In general, remote objects are not replaced by their stubs. The remote object remains on the server and the stub is delivered to the client to act as a proxy for accessing the remote object. The common bond between the stub and the remote object is the remote interface that they both implement which allows a stub on a client machine to operate as if it was the remote object on the client. There is one place where a remote object is actually replaced by a stub. If a remote object that has been exported is passed as a parameter to, or returned as the result from, a remote method call, then the remote object is replaced by its stub. So for instance, if a remote object returns itself (i.e. this) from a remote method, then
Related Questions
- I am getting a ClassNotFoundException for my stub class when I try to register a remote object in the registry. Whats happening?
- When a stub router running ODR sends a packet to a remote address, how does it determine the destination?
- Why does an application that exports an RMI remote object need to be able to load the stub class?