RFR: 7130985: Four helper classes missing in Sun JDK (original) (raw)
Mark Sheppard mark.sheppard at oracle.com
Wed Jul 16 08:09:09 UTC 2014
- Previous message: RFR: 7130985: Four helper classes missing in Sun JDK
- Next message: 8050044: (process) Increase reaper thread native stack size by a factor of 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Alan, we retrieved the IDL from the OMG web site http://www.omg.org/spec/CORBAe/20080201/CORBA_TypeCode.idl
to regenerate the Helper classes ... this didn't compile properly and had to be manipulated to get the relevant exceptions required
IvalidName is defined in http://www.omg.org/spec/CORBAe/20080201/CORBA_ORB.idl
again we extracted the necessary exception and place it in a CORBA module to regenerated the Helper classes
the definition for the exception Bounds at the top level CORBA module couldn't be found so it was hand crafted.
other IDL located at http://www.omg.org/spec/CORBAe/20080201/
I've placed a reference, in the bug, to record the IDL locations.
The OMG also provides a jar, or zip, file containing these generated classes, all of which will throw a not implemented exception in the associated methods of the provided classes. But these form a reference of what is required for a compliant implementation. Furthermore, if we look at the IDL to Java language mapping specifications, the following can be found, which alludes to the inclusion of the referenced helper classes for a compliant implementation:
4.19.2 Certain Exceptions The standard CORBA PIDL uses several exceptions, Bounds, BadKind, and InvalidName. No holder classes are defined for these exceptions, nor are they in the interface repository. However, so that users can treat them as “normal exceptions” for programming purposes, they are otherwise mapped as normal user exceptions, including the generation of helper classes. They are defined within the scopes that they are used. A Bounds and BadKind exception are defined in the TypeCodePackage for use by TypeCode. A Bounds exception is defined in the standard CORBA module for use by NVList, ExceptionList, and ContextList. An InvalidName exception is defined in the ORBPackage for use by ORB. // Java package org.omg.CORBA; final public class Bounds extends org.omg.CORBA.UserException { public Bounds() {...} } package org.omg.CORBA.TypeCodePackage; final public class Bounds extends org.omg.CORBA.UserException { public Bounds() {...} IDL to Java Language Mapping, v1.3 65 } final public class BadKind extends org.omg.CORBA.UserException { public BadKind() {...} } package org.omg.CORBA.ORBPackage; final public class InvalidName extends org.omg.CORBA.UserException { public InvalidName() {...} }
regards Mark
On 15/07/2014 20:34, Alan Bateman wrote:
On 15/07/2014 18:27, Rob McKenna wrote:
Hi folks,
Looking for a review for the following: bug: https://bugs.openjdk.java.net/browse/JDK-7130985 webrev: http://cr.openjdk.java.net/~robm/7130985/webrev.01/ As per the bug report: The IDLtoJava spec clearly specifies the need of the helper class (not the Holder) for these files. But these are absent in the JDK. So, if we try to send any of these classes across in a client-server rmi-iiop model, it will throw an error complaining about the absence of the helper class. There is clearly a lot of history and would be useful to get confirmation that these are required for OMG complication. As this is generated code then I'm curious where the original source is. Just wondering if it would make sense to check-in the original CORBATypeCode.idl. Do we have any standalone tests that can be used to exercise these classes? -Alan
- Previous message: RFR: 7130985: Four helper classes missing in Sun JDK
- Next message: 8050044: (process) Increase reaper thread native stack size by a factor of 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]