RMI Section Index | Page 11
Well, to tell you exactly how to do it would take up too much space, but to give you an idea, you would basically create a server which listens for connections on a port and accept these connectio...more
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
The Sun RMI implementation does not offer a standardized method to control the number of clients biding to a remote object.
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
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.
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
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
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
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
For complete details, see my RMI tutorial at Sun's Java Developer Connection: http://developer.java.sun.com/developer/onlineTraining/rmi/RMI.html#FirewallIssuesmore
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