persistence@glassfish.java.net

Serializable Entities

From: Shelley <randomshelley_at_gmail.com>
Date: Wed, 21 Nov 2007 12:47:30 -0600

What are the best practices for serializing entities? My entities use
field-based access, so custom serialization will not work because this
requires that the instance variables are declared 'transient' (which
indicates to the persistence provider that such fields are not to be
persisted). Is default serialization generally a recommended practice
for entities, or will I need to refactor my entity classes for
property-based access in order to customize the serialization?