CIT 597 Assignment 8: Remote Warehouse
Fall 2003, David Matuszek

Purposes of this assignment:

Idea of the assignment:

I have a simple little program that simulates a retail store (with a GUI) that requests goods from a warehouse. The warehouse stocks television sets (and only television sets), and the retail store can ask for a certain number of television sets. The retail store can also ask how many television sets are remaining, and will get an OutOfStockException if it requests more than are available.

Your task is to modify my program ( so that the retail store software and the warehouse software can reside on different computers (but we will use localhost for both).

In more detail:

Create a directory called RmiAssignment. In it, create two subdirectories, called Server and Client. Put the Warehouse code in the Server directory, and the RetailOutlet class in the Client directory. Other classes can go wherever you like.

Now, use RMI to make the program work as before (at least, from the user's point of view). To do this you will have to modify the code, write and implement interfaces, etc. You will need to create a Warehouse as a remote object and register it, and use this remote object from your client RetailOutlet object.

Objects are registered with rmiregistry by name. To ensure a unique name, please use "rmi://localhost/yourLoginName".

Before you begin programming, you may want to download, compile, and run the Hello World example from my slides. This way you can check whether you understand the compilation and registry process. (Note: It is OK for all of these files to be in the same directory.)

Due date:

Monday, November 17, before midnight.