Bean Internals  «Prev 

JavaBeans Persistence Properties

Since the state of a Bean is largely determined by its properties, persistence primarily involves the storage and retrieval of properties The storage and retrieval is handled by the JavaBeans persistence mechanism calling getter and setter (accessor) methods on all the properties of a Bean.

Implementing Persistence

Implementing Persistence describes how to make your Beans, and their customized state, saveable and restoreable.
A Bean persists by having its properties, fields, and state information saved and restored to and from storage. The mechanism that makes persistence possible is called serialization. When a Bean instance is serialized, it is converted into a data stream and written to storage. Any applet, application, or tool that uses that Bean can then "reconstitute" it by deserialization. JavaBeans uses the JDK's Object Serialization API for its serialization needs.
As long as one class in a class's inheritance hierarchy implements Serializable or Externalizable, that class is serializable.
All Beans must persist. To persist, your Beans must support serialization by implementing either the java.io.Serializable interface, or the java.io.Externalizable interface. These interfaces offer you the choice between automatic serialization, and "roll your own".