Why a Hibernate persistence object in Java is marked serializable
2 Answers
Quoting Java Persistence with Hibernate:
Hibernate doesn’t require that persistent classes implement Serializable. However, when objects are stored in an HttpSession or passed by value using RMI, serialization is necessary. (This is likely to happen in a Hibernate application.)
Because almost always your data objects crosses the machine that contains your data access code. So your objects should be serialized here and deserialized in distant machine to be used.