Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D9CE19805 for ; Fri, 15 Jun 2012 09:42:36 +0000 (UTC) Received: (qmail 97958 invoked by uid 500); 15 Jun 2012 09:42:36 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 97861 invoked by uid 500); 15 Jun 2012 09:42:36 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 97849 invoked by uid 99); 15 Jun 2012 09:42:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 09:42:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 15 Jun 2012 09:42:28 +0000 Received: (qmail 17344 invoked from network); 15 Jun 2012 09:42:06 -0000 Received: from unknown (HELO ?192.168.1.37?) (194.158.197.10) by vorsha.objectstyle.org with SMTP; 15 Jun 2012 09:42:06 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Serialization warnings From: Andrus Adamchik In-Reply-To: <4FDB00C0.2020204@maniatis.org> Date: Fri, 15 Jun 2012 12:42:05 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <595E9D02-0C3D-437B-96E3-F3A0B91B7077@objectstyle.org> References: <4FDAFCFF.9060808@maniatis.org> <4FDB00C0.2020204@maniatis.org> To: dev@cayenne.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org 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? >=20 > 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? >=20 > Or am I missing the use cases of this feature?Are we actually helping? >=20 >=20 > Ari >=20 >=20 > 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. >>=20 >> Andrus >>=20 >> On Jun 15, 2012, at 12:14 PM, Aristedes Maniatis wrote: >>=20 >>> 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. >>>>=20 >>>> Testing this aspect might be in order. >>>=20 >>> 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? >>>=20 >>>=20 >>> Ari >>>=20 >>>=20 >>>=20 >>>=20 >>> -- >>> --------------------------> >>> Aristedes Maniatis >>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A >>>=20 >>>=20 >>>=20 >>=20 >=20 > --=20 > --------------------------> > Aristedes Maniatis > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A >=20 >=20 >=20