Java serialization was initially used to support remote method invocation
(RMI), allowing argument objects to be passed between two virtual machines.
RMI works best when the two VMs contain compatible versions of the class
being transmitted, and can reliably transmit a binary representation of the
object based on its internal state. When an object is serialized, it must
also serialize the objects to which its fields refer - resulting in what is
commonly called an object graph of connected components. Although the
transient keyword can be used to control the extent to which the
serialization process penetrates the object graph, this level of control is
seldom enough.
Many have tried to use Java's serialization to achieve the so-called
"long-term persistence" of data - wh... (more)