On Sat, 2 Jul 2005 20:21:54 -0500, "Joan" <> wrote
or quoted :
>
>I read about this somewhere, but forget the details. Short answer
>is that you can. It has to do with the serialver command and the
>long serialVersionUID
>that it produces.
I discovered to complicate this that not only is each serialisable
base class supposed to have a id version number, but every individual
subclass as well. I guess the idea is you can rescue the base class
info even if you can't rescue the modified subclass.
I guess the way you do it is the way you would in the old cobol days.
You have the old record layout and the new and you write a utility
that does a move corresponding (faked in java with a utility)
to copy the fields across. You write one of these to convert from v1
to v2, v2 to v3 etc. When you open a file you read the first record
that tells the versionlayout of the file, then apply the appropriate
updater before continuing processing. I worked with a scheme like
this in C for educational software so end users could restore old
datafile backups safely.
Some how though you have to have the same class name used for both old
and new code. I guess you implement an interface on both and load
them with separate class loaders??
This is something than needs automation.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/...s_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See
http://mindprod.com/iraq.html photos of Bush's war crimes