Reputation: 14234
EHCache allows for persistance of the cache, and it requires all objects that are being cached to be Serializable. The objects that are being serialized and written to the Disk are being written with ObjectOutputStream, which is fixed in its required fields and UID. link text
My question is: Is there a way to force the serialization [i.e. overwritting writeObject] to force an non-fixed/versioned way? [i.e. protocol buffers, xml, etc]
Upvotes: 0
Views: 764
Reputation: 310980
ObjectOutputStream, which is fixed in its required fields and UID.
No it isn't. It requires a fixed serialVersionUID all right, but it has a lot of flexibility about how much versioning it can support - see the Versioning chapter of the Object Serialization Specification.
Upvotes: 1