COMP 310
Spring 2010
|
Lec23: RMI
|
 |
Today we will start exploring the world of Remote Method Invocation or "RMI".
Information on RMI can be
found in the Comp310 Java Resources web pages.
Download the demo code for today.
UPDATE 3/13/10: The bug in the code posted for
class on 3/12/10 has been fixed! Please download the latest
code above!
To stop the running server,
- Change to the server's console by either closing the console of the
client if it open by clicking the "x" on the console tab or by selecting the
server's console by pulling down the "Display Selected Console" drop-list on
the console tab.
- Click the red square "Terminate" button on the console tab.
Things to try:
- Bind multiple Server implementations to the
same name in the Registry:
- Start the original Server.
- Change the return value of sayHello()
method of the Server class to return a
different value.
- Without terminating the previous
Server , run the Server again.
- Without modifying it, run the Client
again.
- Even though the original Server is
still running, what is the value retrieved by the
Client?
- Bind multiple Server implemenations to
different names in the Registry.
- Start a version of the Server.
- Run the Client to verify the value
returned is what you expect.
- Modify the Server's
sayHello() method to return a different
value.
- Modify the Server's
run() method to bind the
Hello object with a different name.
- Without terminating the previous
Server , run the Server again.
- Without modifying it, run the Client
again. What value is returned?
- Modify the Client so that it accesses
the new Registry binding name being used in the modified
Server code above.
- Run the Client again.
What value is returned?
© 2010 by Stephen Wong