A.3 RMI Registry

 <  Day Day Up  >  

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  >  


Enterprise Java Security. Building Secure J2EE Applications
Enterprise Javaв„ў Security: Building Secure J2EEв„ў Applications
ISBN: 0321118898
EAN: 2147483647
Year: 2004
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net