posted 15 years ago
Serializable - the breakfast interface. Making sure we can pour milk over our JavaBeans and have them for breakfast.
Serialization is used not only to store object state to a filesystem, but also to send object state across a network. That's one of the reasons networking in Java is just as easy as interacting with a file system.
So, in a clustered environment, you may read a user object in from a database, but the clustered JVM might have to do workload management on the user object - maybe make it available to sessions running on different JVMs. If the object is serializable, then the JVM will be able to pass that Java object around like yesterdays newspaper. If it's not serializable, there will be problems.
That's just one, sorta hidden reason, on why it's important to make sure all JavaBeans are serializable.