What role does serialization have in RMI?

Tim Rohaly

RMI uses serialization as its basic and only mechanism for sending objects across a network.

If an object implements java.rmi.Remote, then the object's stub is serialized and sent to the client. If the object implements java.io.Serializable, then the object itself is serialized and sent.