Lets say that I have a program that for some reason need to handle old versions of serialized objects.
Eg: when deserializing, one of these versions may be encounter
Should I do deserialization in one class loader, and if that fails try using another class loader that uses an older version (and so on), or are there better ways?
What's the best strategy?
Serialization really shouldn't be used for long term storage.
The best strategy here is to make use of a database instead: store your objects in a Pets table, then as you change fields on your table, all of your old data gets updated too, every object has the same and most up-to-date schema.
This is really the best way to maintain data for longterm storage, and updates to your old objects to fill in null fields is really easy.