Java Rmi - Case Study 1
Java Rmi - Case Study 1
Remote Method Invocation (RMI) is an API that allows an object to invoke a method on an
object that exists in another address space, which could be on the same machine or on a
remote machine. Through RMI, an object running in a JVM present on a computer (Client-
side) can invoke methods on an object present in another JVM (Server-side). RMI creates a
public remote server object that enables client and server-side communications through
simple method calls on the server object.
Note
java.rmi package: Remote Method Invocation (RMI) has been
(RPC).
Stub Object
Stub Object: The stub object on the client machine builds an
information block and sends this information to the server.
It calls the desired method on the real object present on the server.
It forwards the parameters received from the stub object to the method
Working of RMI
intermediate objects: Stub object (on client side) and Skeleton object
Step 3: Creating Stub and Skeleton objects from the implementation class using rmic (RMI
compiler)
of Java's RMI framework. It's a simple server-side bootstrap naming facility used by
RMI servers on the local host to bind exported objects to names. When an RMI
server is started, it needs to register its services (objects) with the rmiregistry so
• Error Handling:Handling errors and exceptions in Java RMI can sometimes be challenging,
especially when dealing with network-related issues or remote method failures.