Issue 6992: defaultWriteObject clarification (java2idl-rtf) Source: Oracle (Dr. Andrew Piper, andyp(at)bea.com) Nature: Clarification Severity: Summary: We have recently found an interop problem with another Vendor's orb and wanted some clarification on the customer marshaling format wrt defaultWriteObject. 1.4.10 says: For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject was called, false otherwise. However it is mute on the subject of writeFields and readFields. The Java serialization spec indicates that defaultWriteObject and writeFields are somewhat equivalent, so (a) one could argue that the boolean should be true if writeFields has been called. (b) One could also argue that the spec doesn't say this and so the boolean should be false. My feeling is that (a) is correct (and this is what the other orb does) but that it should be called out explicitly in the spec. Comments appreciated Resolution: Revised Text: In section 1.4.10, change the text quoted above to: For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject or writeFields was called, false otherwise. Actions taken: February 17, 2004: received issue July 30, 2007: closed issue Discussion: Closed, accepted. See revised text below. End of Annotations:===== ender: andyp@ussfex01.bea.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Tue, 17 Feb 2004 09:37:41 -0800 To: java2idl-rtf@omg.org From: Andy Piper Subject: defaultWriteObject clarification Cc: ravia@bea.com Hello, We have recently found an interop problem with another Vendor's orb and wanted some clarification on the customer marshaling format wrt defaultWriteObject. 1.4.10 says: For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject was called, false otherwise. However it is mute on the subject of writeFields and readFields. The Java serialization spec indicates that defaultWriteObject and writeFields are somewhat equivalent, so (a) one could argue that the boolean should be true if writeFields has been called. (b) One could also argue that the spec doesn't say this and so the boolean should be false. My feeling is that (a) is correct (and this is what the other orb does) but that it should be called out explicitly in the spec. Comments appreciated Date: Mon, 08 Mar 2004 12:40:52 +0000 From: Simon Nash Organization: IBM X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en To: Andy Piper CC: java2idl-rtf@omg.org Subject: Re: issue 6992 -- Java to IDL RTF issue Andy, I think we should go with your preferred option (a). The Java serialization spec implies very strongly that defaultWriteObject and writeFields are equivalent. I think we should state this explicitly in the Java to IDL mapping spec. Does anyone object to this? Simon Juergen Boldt wrote: > > This is issue # 6992 From: Andy Piper > > defaultWriteObject clarification > > We have recently found an interop problem with another Vendor's orb and > wanted some clarification on the customer marshaling format wrt > defaultWriteObject. 1.4.10 says: > > For serializable objects with a writeObject method: > b. boolean - True if defaultWriteObject was called, false otherwise. > > However it is mute on the subject of writeFields and readFields. The Java > serialization spec indicates that defaultWriteObject and writeFields are > somewhat equivalent, so (a) one could argue that the boolean should be true > if writeFields has been called. (b) One could also argue that the spec > doesn't say this and so the boolean should be false. My feeling is that > (a) is correct (and this is what the other orb does) but that it should be > called out explicitly in the spec. > > Comments appreciated > > ================================= > Jürgen Boldt > Director, Member Services > > Object Management Group > 250 First Avenue, Suite 100 > Needham, MA 02494 > > Tel. +1 781 444 0404 ext. 132 > Fax: +1 781 444 0320 > email: juergen@omg.org > www www.omg.org > > ================================ -- Simon C Nash IBM Distinguished Engineer Hursley Park, Winchester, UK nash@hursley.ibm.com Tel. +44-1962-815156 Fax +44-1962-818999 X-Sender: andyp@ussfex01.bea.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Mon, 08 Mar 2004 08:06:08 -0800 To: Simon Nash From: Andy Piper Subject: Re: issue 6992 -- Java to IDL RTF issue Cc: java2idl-rtf@omg.org At 04:40 AM 3/8/2004, Simon Nash wrote: I think we should go with your preferred option (a). The Java serialization spec implies very strongly that defaultWriteObject and writeFields are equivalent. I think we should state this explicitly in the Java to IDL mapping spec. Does anyone object to this? Sounds good to me. X-Sender: andyp@ussfex01.bea.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Tue, 09 Mar 2004 10:33:43 -0800 To: Simon Nash From: Andy Piper Subject: Re: issue 6992 -- Java to IDL RTF issue Cc: java2idl-rtf@omg.org Ok. so change 1.4.10 to read: "For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject or writeFields was called, false otherwise. c. (optional) Data written by defaultWriteObject or writeFields. The ordering of the fields is the same as the order in which they appear in the mapped IDL valuetype, and these fields are encoded exactly as they would be if the class did not have a writeObject method." Thanks Date: Wed, 10 Mar 2004 15:26:39 +0000 From: Simon Nash Organization: IBM X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en To: Andy Piper CC: java2idl-rtf@omg.org Subject: Re: issue 6992 -- Java to IDL RTF issue Andy, Unfortunately this wording implies that fields written by writeFields are encoded exactly as they would be if the class did not have a writeObject method, which isn't the case. How about the following: "For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject or writeFields was called, false otherwise. c. (optional) Data written by defaultWriteObject or writeFields. The ordering of the fields is the same as the order in which they appear in the mapped IDL valuetype. For defaultWriteObject, these fields are encoded exactly as they would be if the class did not have a writeObject method. For writeFields, the values provided by calling ObjectOutputStream.PutField.put methods are used to encode the fields." Simon Andy Piper wrote: > > Ok. so change 1.4.10 to read: > > "For serializable objects with a writeObject method: > b. boolean - True if defaultWriteObject or writeFields was called, false > otherwise. > c. (optional) Data written by defaultWriteObject or writeFields. The > ordering of the fields > is the same as the order in which they appear in the mapped IDL valuetype, and > these fields are encoded exactly as they would be if the class did not have a > writeObject method." > > Thanks > > andy -- Simon C Nash IBM Distinguished Engineer Hursley Park, Winchester, UK nash@hursley.ibm.com X-Sender: andyp@ussfex01.bea.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.2.0 Date: Wed, 10 Mar 2004 09:48:02 -0800 To: Simon Nash From: Andy Piper Subject: Re: issue 6992 -- Java to IDL RTF issue Cc: java2idl-rtf@omg.org Looks good andy At 07:26 AM 3/10/2004, Simon Nash wrote: Andy, Unfortunately this wording implies that fields written by writeFields are encoded exactly as they would be if the class did not have a writeObject method, which isn't the case. How about the following: "For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject or writeFields was called, false otherwise. c. (optional) Data written by defaultWriteObject or writeFields. The ordering of the fields is the same as the order in which they appear in the mapped IDL valuetype. For defaultWriteObject, these fields are encoded exactly as they would be if the class did not have a writeObject method. For writeFields, the values provided by calling ObjectOutputStream.PutField.put methods are used to encode the fields." Simon Andy Piper wrote: > > Ok. so change 1.4.10 to read: > > "For serializable objects with a writeObject method: > b. boolean - True if defaultWriteObject or writeFields was called, false > otherwise. > c. (optional) Data written by defaultWriteObject or writeFields. The > ordering of the fields > is the same as the order in which they appear in the mapped IDL valuetype, and > these fields are encoded exactly as they would be if the class did not have a > writeObject method." > > Thanks > > andy -- Simon C Nash IBM Distinguished Engineer Hursley Park, Winchester, UK nash@hursley.ibm.com Date: Thu, 16 Nov 2006 18:58:18 . From: Simon Nash Organization: IBM User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en To: Jishnu Mukerji , Ken Cavanaugh , Jeffrey Mischkinsky , Yoshitaka Honishi , Andy Piper , Naveed Shaikh , Bill Beckwith , Eoghan Glynn CC: java2idl-rtf@omg.org Subject: Proposed resolution for Java to IDL issue 6992 Here is a proposed resolution for issue 6992. Issue title: defaultWriteObject clarification Issue summary: We have recently found an interop problem with another Vendor's orb and wanted some clarification on the customer marshaling format wrt defaultWriteObject. 1.4.10 says: For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject was called, false otherwise. However it is mute on the subject of writeFields and readFields. The Java serialization spec indicates that defaultWriteObject and writeFields are somewhat equivalent, so (a) one could argue that the boolean should be true if writeFields has been called. (b) One could also argue that the spec doesn't say this and so the boolean should be false. My feeling is that (a) is correct (and this is what the other orb does) but that it should be called out explicitly in the spec. Comments appreciated Proposed resolution: In section 1.4.10, change the text quoted above to: For serializable objects with a writeObject method: b. boolean - True if defaultWriteObject or writeFields was called, false otherwise. Simon -- Simon C Nash IBM Distinguished Engineer Hursley Park, Winchester, UK nash@hursley.ibm.com andy