Wednesday, October 21, 2009

A.3 RMI Registry











 < Day Day Up > 





A.3 RMI Registry



How does the stub get a handle to the server skeleton object on the server machine? This happens through the RMI registry, a simple server-side name server that allows remote clients to get a reference to a remote object. The RMI registry is typically used only to locate the first remote object to which an RMI client needs to talk. In turn, that first object would provide application-specific support for finding other objects. Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then remotely invoke methods on the object. At the server end, the RMI server source code must bind the server object with a reference to the object and a name, which is a unique string on the RMI registry.



Note that for security reasons, an application can bind or unbind only to a registry running on the same host. This prevents a client from removing or overwriting any of the entries in a server's remote registry. A lookup, however, can be done from any host.













     < Day Day Up > 



    No comments:

    Post a Comment