Serialization

Remote method calls travel across the network wire between the client and server. Since network packets are just a series of bytes, the parameters to a remote call must be converted into a byte stream. When the network packets arrive on the server, the RMI implementation then converts the byte stream back into objects. RMI utilizes Java's serialization facilities to handle converting remote method parameters to the wire format and back into objects on the server.

Unlike local method calls where parameters can be arbitrary types, RMI parameters and return values must implement either the java.io.Serializable or the java.rmi.Remote interface.

RMI parameters must implement java.io.Serializable or java.rmi.Remote.

The Serializable ...

Get J2EE™ Applications and BEA™ WebLogic Server™ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.