db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: Storing Java Objects in a table
Date Thu, 27 Oct 2005 00:08:02 GMT
Rick Hillegas wrote:

> I recommend that you make your class implement java.io.Externalizable.
> That way you can write your own deserialization logic to handle version
> upgrades of your class. Don't rely on java.io.Serializable; it doesn't
> handle versioning and  isn't appropriate for persisting data; as soon as
> you make a change to your class, you won't be able to deserialize old
> versions.

I agree with the recommendation to use, or at least consider,
Externalizable, but I think you are a little harsh on Serializable. If
you follow the guidelines you can modify the class and continue to
deserialize old versions.



View raw message