cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Serialization warnings
Date Fri, 15 Jun 2012 09:42:05 GMT
See my earlier message. IMO serialVersionUID of the server superclass is immutable as it doesn't
declare any properties. For ROP client serialVersionUID will depend on the model changes,
but only on those that change java signature of the ivars (e.g. changing DbAttribute LENGTH
should not result in serialVersionUID change; renaming ObjAttribute should). And I think this
should be handled automatically (why not?)

The scope of "invalidation" is really just previously serialized objects stored somewhere
in a binary form. And I guess those should be invalidated when the ROP object format changes,
right?

Andrus


On Jun 15, 2012, at 12:30 PM, Aristedes Maniatis wrote:

> Yes, but this really only has an effect if you serialise the Cayenne entities across
a cluster, or to a database (where they are read by a new version of the application which
you launch). In that case do we want to automatically throw a serialisation exception for
the user when the the change in the Cayenne model was unimportant to the operation of the
application?
> 
> Isn't this something which the developer should change by hand in the subclass and not
have Cayenne automatically invalidate every object in the _superclass just because there was
some (possibly insignificant) change in the model?
> 
> Or am I missing the use cases of this feature?Are we actually helping?
> 
> 
> Ari
> 
> 
> On 15/06/12 7:21pm, Andrus Adamchik wrote:
>> Serialized HttpSessions is one common case. This is on in Tomcat by default, so every
time you restart the server, Tomcat goes through serialization cycle.
>> 
>> Andrus
>> 
>> On Jun 15, 2012, at 12:14 PM, Aristedes Maniatis wrote:
>> 
>>> On 15/06/12 6:34pm, Durchholz, Joachim wrote:
>>>> Don't take this as an expert opinion, but since subclasses contain all
>>>> member fields of the superclass, I'd expect that a subclass needs to
>>>> have a changed SerialVersionUUID if the superclass changes.
>>>> 
>>>> Testing this aspect might be in order.
>>> 
>>> My question would be: test what? In the real world are SerialVersionUUID particularly
useful for Cayenne entities? With Cayenne ROP, I've never seen any code in Hessian which pays
any attention to the version. Is this more useful with a cluster of application servers and
different instances running different versions of the code? Are there are specific use cases
where Cayenne entities would be involved?
>>> 
>>> 
>>> Ari
>>> 
>>> 
>>> 
>>> 
>>> --
>>> -------------------------->
>>> Aristedes Maniatis
>>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>>> 
>>> 
>>> 
>> 
> 
> -- 
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
> 
> 
> 


Mime
View raw message