Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 

Simple Banking System


by jGuru

[Help | API Docs | Short Course| Exercises]

This exercise leads you through the creation of your first RMI system.

In this exercise, you will run the RMI Registry (which will manage the publication of the RMI remote services), run a server program that creates the actual remote services, and finally, finish coding the program BankUser, which will use the RMI remote services.

Prerequisites

Skeleton Code

Tasks


  1. Run the RMI Registry program.

  2. Copy all the .class files to a directory.

  3. Run the RMI server that hosts the remote service objects.

  4. Create and run a program that will use the exported RMI services. Find out the owner of account 4461 and how much money is in it.

Where help exists, the task numbers above are linked to the step-by-step help page.

When you finish this exercise, you will have run your first RMI system.

It consists of three major parts:

  • The RMI Registry that hold references to the remote services.
  • The RMI host server program that creates the remote services, registers them with the registry and waits for client requests.
  • The RMI client program. A program that obtains references to remote service object from the RMI registry and then uses those services.

Solution Source

Demonstration

When the RMI Registry and the RMI host sever program are run, there is no observable behavior. When the RMI client BankUser is run, the console will display what ever messages you include in the program.

The solution specifically displays: Charlie's account has $600.00

Next Magercise

Exercises

Short Course

Copyright 1996-2000 jGuru.com. All Rights Reserved.


[ This page was updated: 11-Feb-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.