RMI Introduction

 

The purpose of this exercise is to gain familiarity with the Java Remote Method Invocation (RMI) approach in the implementation of distributed objects.

 

Follow the Sun (jGuru) tutorial on RMI: http://java.sun.com/developer/onlineTraining/rmi/index.html

 

Complete Exercises 1-4, stopping at the “Distributing RMI Classes” section of the tutorial. (You are welcome to continue on with the remainder of the tutorial as time allows).

 

Review the Proxy design pattern ( GoF book – page 207) as it plays a key role in the implementation of RMI.

 

Notes:

·        Work through the tutorial with a partner.

·        This tutorial assumes you are working in a command line environment (DOS or Linux). I would advise using this environment for the tutorial and then moving on to Eclipse once you better understand the RMI framework.

·        The tutorial can be completed on single machine with RMI objects distributed among separate processes (JVM’s) - remember that “transparency” characteristic of distributed systems. Once you get it running on a single machine try distributing your application on external machines in the lab and your own computers. (We may need to play with available ports in the lab.)

·        There are no artifacts to submit for this exercise, but it is in your interest to complete it as it forms the basis for the projects we will be engaged in throughout the quarter.

·        Post questions, answers and suggestions to the “RMI Support” discussion forum on myCourses.

 

RMI-Eclipse Plug-in:

·        All SE lab machines have the RMI plug-in for Eclipse found at http://www.genady.net/

·        This (once free) plug-in is now a commercial project, but is still free for undergraduate students. The general download is good for fourteen days, but you can request a free student license key which is good for 4 months.

·        Eclipse plug-in installation refresher:

o       Help -> Software Updates -> Find and Install

o       Search for new features to install

o       New Remote site

o       Paste RMI plugin url : http://www.genady.net/rmi/v20/install_e33/

·        It comes with a very good Flash tutorial that works though a simple remote printer application. (Select new Java RMI project – RMI Project Tutorials) Watch the tutorial and then build a set of projects in Eclipse for the Banking application from the jGuru tutorial.