A distributed banking system that consists of two parts: one for the client and another for the server.
Check out More info for french ressources and project presentation π
The remote method invocation goes through a STUB on the client side and a so called SKELETON on the server side.
A stub for a remote object acts as a client's local representative for the remote object. In RMI, a stub for a remote object implements the same set of remote interfaces that a remote object implements.
.
βββ ...
βββ ClientRMI
| βββ src
| β βββ ClientRMI.java
| βββ ...
βββ ...
When a skeleton receives an incoming method invocation it does the following:
- Unmarshals (reads) the parameters for the remote method,
- Invokes the method on the actual remote object implementation, and
- Marshals (writes and transmits) the result (return value or exception) to the caller.
.
βββ ...
βββ RMISERVER
| βββ src
| β βββ ServeurRMI.java
| βββ ...
βββ ...
I have started the RMI Registry within the server JVM, via the LocateRegistry.createRegistry() API.
(Default port: 1099)
- Remote objects can be listed in the
RMI Registry. - Clients can get a reference to the
remote objectby querying the Registry. - After that, the client can call methods on the remote objects.
From the client machine
- Activate Telnet protocol.
- Find out the ip address of the server.
- Type
Telnet <IP Address> <port number>Note: Do not include the <> when entering the IP Address and the Port Number.