Re: Replacing JRMP with JERI

Peter Jones - JavaSoft East <[email protected]>
Newsgroups gmane.comp.java.sun.rmi
Message-ID <20050711154847.GB8722@east>
> Not sure what you mean. You mean the RMIRegistry doesn't work with JERI?
> It's not pluggable and is actually a JRMPRegistry?

Depends what you mean.  The RMI registry remote object created by the
"rmiregsitry" tool or the LocateRegistry.createRegistry API is always
exported with JRMP, meaning that you can only communicate with it
using JRMP (possibly with custom socket factories).  You can still
register JERI stubs/proxies in it, though, if the necessary libraries
are in its class path.

Note that this RMI registry implementation is just a very simple
remote object, essentially a hash table that maps strings to
serializable objects that are instances of java.rmi.Remote, with some
simple client-IP-based access control.  What's special about it is
that it gets exported with a "well-known" java.rmi.server.ObjID, so
that a bootstrap stub can be created for it by a client, which is done
using the LocateRegistry.getRegistry API (or indirectly through the
java.rmi.Naming API).

The JERI API provides a public way to export any remote object with
the JERI equivalent of a "well-known" object ID[*] and to conjure a
stub/proxy for such an exported object, so it would be straightforward
to implement an "RMI registry" equivalent (perhaps even supporting the
same java.rmi.registry.Registry interface) that uses some form of JERI
for communication.  The Jini starter kit does not include code that
does this because the expectation is that using a Jini lookup service
would be more desirable anyway, but I just mention this to note that
it would be simple to have a JERI-based "RMI registry".

-- Peter

[*] as mentioned in this previous discussion:
        http://archives.java.sun.com/cgi-bin/wa?A2=ind0506&L=rmi-users&P=186

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.