RMI Section Index | Page 11
If a class implements both the Serializable and Remote interfaces, is the stub serialized and sent to the client or is the object?
If an object implements java.rmi.Remote, then it
is treated as a remote object - that is, its stub
is serialized and sent to the client.
This is true whether or not the object also implements
jav...more
What role does serialization have in RMI?
RMI uses serialization as its basic and only mechanism for
sending objects across a network.
If an object implements java.rmi.Remote, then the
object's stub is serialized and sent to the client...more
How can I load the stub and interface files dynamically at the client, instead of copying manually, with RMI applications?
You can find the answer to this question at:
http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.htmlmore
Does a stub possess a server-side role also? Practically all the literature on RMI, including the RMI Specification document, talks only about the role of a stub on the client side. For instance, once I generate a stub class and copy it over to the client side, can it now be safely deleted from the server side?
Referring to its client-side role, this is what the RMI Specification
document has to say about stubs:
A stub for a remote object acts as a client's local representative or
proxy for the remote...more
How do I control number of clients binding to the RMI server?
The Sun RMI implementation does not offer a standardized method to control the number of clients biding to a remote object.
How do I setup a Servlet as an RMI client (and not get an RMI Security exception in the process)?
I think this depends a lot on the JDK you are using to run your
Servlet Engine.
Platform 2 (JDK 1.2, 1.3): take a look at the security policy.
Refer to the documentation for setting co...more
Is there some way to lookup what remote services are available?
The Naming.list() method allows you to get a list of the objects in the registry, returning a String[] of names that can be looked up.
With JDK 1.2, what policies do I have to setup to grant the necessary permissions for RMI?
Sun's RMI tutorial shows the necessary policies at http://java.sun.com/docs/books/tutorial/rmi/running.html. Basically, you have to enable connecting from anywhere to the HTTP port and connecting ...more
What protocol does RMI use to communicate between objects? Do developers need to know the underlying protocol (eg. UDP, TCP/IP) while developing RMI applications?
On top of TCP/IP, RMI uses a wire level protocol called Java Remote Method Protocol (JRMP). JRMP is a proprietary, stream-based protocol that is only partially specified and now consists of two ve...more
For activation, how do I get my objects to run in multiple VMs and not the VM of rmid.exe ??
The deal with spawning multiple VMs is the following bottom line.
Refer to page 56 of the RMI specs ...
"All objects with the same groupID are activated in the same Java VM".
period.
To start m...more
How do I communicate over a secure RMI link?
You can find all the details you need within the following Sun documents:
The SUN SSL Info
Creating custom socket factories
The naming registry is implemented as a standard RMI service, so attem...more
I have a servlet that is doing an RMI call to a single remote object. Since any invocation of the servlet is created in a new thread, I'm observing a new TCP/IP connection for every single servlet request.
I have a servlet that is doing an RMI call to a single remote object. Since any invocation of the servlet is created in a new thread, I'm observing a new TCP/IP connection for every single servlet ...more
Where can I get the RMI classes for Internet Explorer?
You can get these either directly from Microsoft (ftp://ftp.microsoft.com/developr/msdn/unsup-ed/rmi.zip) and figure out where to put them or get a nice bundled package from IBM (http://www.alphaw...more
What's the scoop with HTTP-tunnelling? Does it really work? Reliably? Quickly? Easily?
For complete details, see my RMI tutorial at Sun's Java Developer Connection:
http://developer.java.sun.com/developer/onlineTraining/rmi/RMI.html#FirewallIssuesmore
By default, what port does the RMI registry listen to?
The rmiregistry program uses port 1099 by default. You can have it listen to a different port by specifying a different port from the command line:
rmiregistry 1234