I am trying to pin down what it is (if anything) that needs to be done
to (for) the LoggingEvent serialization.
The Problem: Serialization of the object works fine at present because
the class definition versions are the same. However, at some point in
the future this may not be the case. Therefore, we want to have a way to
make sure the LoggingEvent object remains backward compatible.
Note: This will only be a problem in client/server (or multiple JVM)
environments. Stand alone instances will not need to worry about it
because they will be using the same class definition version.
Ideas so far have been:
1) Research object serialization to see if there is a way to get this
for free (in a manner of speaking).
2) Implement object serialization using XML.
2.1) Internal to the object (I.e. in writeObject())
2.2) External to the object (I.e. in new class
LoggingEventSerializer?)
3) Use a HashMap to store and retrieve properties by name rather than
create getters and setters for newly added properties.
4) Do nothing. Leave it alone and let the user do it the way they
prefer.
Did it miss one? Which one did we decide on?
Personally I prefer #2.2.
Also, I did actually look into #1. If that will ever be changed in
future classes is adding fields (and other minor stuff) then serializing
different versions of the class are not a problem. However, since I
don't believe this will be the case, I don't think we can rely on
default serialization.
/mike
--
******************************************
Mike Dougherty -- Java Software Engineer
******************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]