An RMI "service" could well be any Java method that can be invoked remotely. The other service is the JRMP RMI naming service which is a lookup service.
RMI uses a layered architecture, each of the layers could be enhanced or replaced without affecting the rest of the system. The details of layers can be summarised as follows:
1. Application Layer: The client and server program
2. Stub & Skeleton Layer: Intercepts method calls made by the client/redirects these calls to a remote RMI service.
3.Remote Reference Layer: Understands how to interpret and manage references made from clients to the remote service objects.
4.Transport layer: Based on TCP/IP connections between machines in a network. It provides basic connectivity, as well as some firewall penetration strategies.
Java RMI-IIOP provides a mechanism to narrow the the Object you have received from from your lookup, to the appropriate type. This is done through the javax.rmi.PortableRemoteObject class and, more specifically, using the narrow() method.
Exports the remote object to make it available to receive incoming calls, using the particular supplied port. If port not specified receives calls from any anonymous port.
The UnicastRemoteObject class provides support for point-to-point active object references using TCP streams. Objects that require remote behavior should extend UnicastRemoteObject.
JRMP(java remote method protocol)
Yes. Those methods behave as normal java methods operating within the JVM.
Using list method of Naming Class.
AlreadyBoundException is thrown by bind(String name) method when a remote object is already registered with the registry with the same name.
Note: rebind method doesn't throw AlreadyBoundException because it replaces the existing binding with same name.