Issue 4656: Mapping of ExceptionDetailMessage service context (java2idl-rtf) Source: (Mr. Simon C. Nash, ) Nature: Uncategorized Issue Severity: Summary: The interop RTF resolved issue 3405 by adding a new service context called ExceptionDetailMessage. The usage of this service context was left to language mappings to define. This usage has been defined for the IDL to Java mapping (issue 4013) but not for the Java to IDL mapping. The resolution for issue 4013 defines how this service context shall be used when marshaling and unmarshaling system exceptions. However, an RMI-IIOP client never receives a system exception, but instead receives a mapped RemoteException or RuntimeException that was created by applying the rules specified in section 1.4.8. Currently these rules do not take account of any detail message that the system exception has acquired from the ExceptionDetailMessage service context by applying the mappings specified by the resolution of issue 4013. In order to ensure that this valuable diagnostic information is available on exceptions received by RMI-IIOP clients as well as IDL clients, I propose the following change to section 1.4.8 of the Java to IDL mapping spec. Proposed resolution: After table 1-2, replace "In all cases, ..." by "If the getMessage() method of the CORBA system exception returns a non-null and non-empty string, the RMI exception is created with this string as its detail string. In all other cases, ..." Resolution: see above Revised Text: Actions taken: November 1, 2001: received issue May 13, 2002: closed issue Discussion: Resolution: Close, no change. The proposed change would cause more problems than it solves. This is because the getMessage() method of RemoteException returns its own detail message concatenated with the detail message of its nested exception. So copying the nested exception's detail message into the top-level RemoteException will cause the same message to be printed twice, which is not very useful! End of Annotations:===== Date: Thu, 01 Nov 2001 18:05:19 +0000 From: Simon Nash Organization: IBM X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; I) X-Accept-Language: en MIME-Version: 1.0 To: issues@omg.org Subject: Mapping of ExceptionDetailMessage service context Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: i6cd91@@e9?Fk!!<4n!! The interop RTF resolved issue 3405 by adding a new service context called ExceptionDetailMessage. The usage of this service context was left to language mappings to define. This usage has been defined for the IDL to Java mapping (issue 4013) but not for the Java to IDL mapping. The resolution for issue 4013 defines how this service context shall be used when marshaling and unmarshaling system exceptions. However, an RMI-IIOP client never receives a system exception, but instead receives a mapped RemoteException or RuntimeException that was created by applying the rules specified in section 1.4.8. Currently these rules do not take account of any detail message that the system exception has acquired from the ExceptionDetailMessage service context by applying the mappings specified by the resolution of issue 4013. In order to ensure that this valuable diagnostic information is available on exceptions received by RMI-IIOP clients as well as IDL clients, I propose the following change to section 1.4.8 of the Java to IDL mapping spec. Proposed resolution: After table 1-2, replace "In all cases, ..." by "If the getMessage() method of the CORBA system exception returns a non-null and non-empty string, the RMI exception is created with this string as its detail string. In all other cases, ..." Simon -- Simon C Nash, Chief Technical Officer, IBM Java Technology Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb Date: Thu, 06 Dec 2001 17:19:43 +0000 From: Simon Nash Organization: IBM X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; I) X-Accept-Language: en MIME-Version: 1.0 To: java2idl-rtf@omg.org Subject: Re: issue 4656 -- Java to IDL RTF issue References: <4.3.2.7.2.20011101131507.00e19480@emerald.omg.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: D5Vd9QkJ!!,<&!!MCgd9 On further consideration, I think my proposal will cause more problems than it solves. This is because the getMessage() method of RemoteException returns its own detail message concatenated with the detail message of its nested exception. So copying the nested exception's detail message into the top-level RemoteException will cause the same message to be printed twice, which is not very useful! If other RTF members agree with this analysis, I will propose closing this issue with no change in the upcoming vote. Simon Juergen Boldt wrote: > > This is issue # 4656 Simon Nash > > Mapping of ExceptionDetailMessage service context > > The interop RTF resolved issue 3405 by adding a new service context called > ExceptionDetailMessage. The usage of this service context was left to > language mappings to define. This usage has been defined for the IDL to Java > mapping (issue 4013) but not for the Java to IDL mapping. > > The resolution for issue 4013 defines how this service context shall be used > when marshaling and unmarshaling system exceptions. However, an RMI-IIOP > client > never receives a system exception, but instead receives a mapped > RemoteException > or RuntimeException that was created by applying the rules specified in > section 1.4.8. Currently these rules do not take account of any detail message > that the system exception has acquired from the ExceptionDetailMessage service > context by applying the mappings specified by the resolution of issue 4013. > > In order to ensure that this valuable diagnostic information is available on > exceptions received by RMI-IIOP clients as well as IDL clients, I propose the > following change to section 1.4.8 of the Java to IDL mapping spec. > > Proposed resolution: > > After table 1-2, replace > > "In all cases, ..." > > by > > "If the getMessage() method of the CORBA system exception returns a non-null > and non-empty string, the RMI exception is created with this string as its > detail string. In all other cases, ..." > ================================================================ > > Juergen Boldt > Senior Member of Technical Staff > > Object Management Group Tel. +1-781 444 0404 ext. 132 > 250 First Avenue, Suite 201 Fax: +1-781 444 0320 > Needham, MA 02494, USA Email: juergen@omg.org > URL: www.omg.org > > ================================================================ -- Simon C Nash, Chief Technical Officer, IBM Java Technology Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb