THE UNIVERSITY OF WESTERN AUSTRALIA

School of Computer Science & Software Engineering

CITS3213 CONCURRENT SYSTEMS

Mini Laboratory Sheet on Java Remote Method Invocation (RMI)

The purpose of this lab is to learn how to use Java RMI. Some example files and step-by-step instructions are supplied. If you missed the lecture on RMI, see the first RMI lecture note.

Please note that javac is supposed to generate the stub class in Java 1.6. However, I had to run rmic (as described below) even though I have java 1.6 in my machine. You should follow the instructions below and report if you have any problem.

Tasks

To run this from another machine :

Additional Larger Tasks

You can also run the larger example that I covered in the second RMI lecture. Here is the link to the relevant section of Java tutorial. You can cut and paste the code from the above link.

Modify the Java code for the producer-consumer example (presented in lectures) so that the Producer and Consumer objects are clients running on different computers that use RMI to invoke methods on a remote Buffer object.

May, 2008.