Issue 1619: Abstract Interfaces issue (java2idl-rtf) Source: (, ) Nature: Revision Severity: Summary: Summary: The current Java to IDL mapping spec does not fully address support for abstract interfaces. There is support for these in the Portability Interfaces chapter, but not in the RMI/IDL Subset or IDL Mapping chapters. Resolution: Revised Text: Actions taken: June 30, 1998: received issue February 24, 1999: closed issue Discussion: End of Annotations:===== Return-Path: Date: Tue, 30 Jun 1998 11:24:01 +0100 From: Simon Nash Reply-To: nash@hursley.ibm.com Organization: IBM To: java2idl-rtf@omg.org Cc: issues@omg.org Subject: Abstract Interfaces The current Java to IDL mapping spec does not fully address support for abstract interfaces. There is support for these in the Portability Interfaces chapter, but not in the RMI/IDL Subset or IDL Mapping chapters. The reason the support was omitted from these chapters was that Java RMI does not support abstract interfaces in JDK 1.1, and it was a goal of the submission to make RMI/IDL a strict subset of current Java RMI. However, given the forthcoming release of JDK 1.2, which does contain support for abstract interfaces, it is appropriate to reconsider this. We are working on an implementation of the mappings for both JDK 1.1 and JDK 1.2. It is important that we have a specification of how support is to be provided for abstract interfaces so that we can add it to our 1.2 implementation. Whether or not abstract interfaces are supported is purely a compile-time issue. No extra support is needed in the runtime. It is therefore possible, with a suitably enabled compiler, to support abstract interfaces on JDK 1.1 for both JRMP and IIOP. For IIOP, Java RMI abstract interfaces are mapped to IDL abstract interfaces (part of the OBV spec). Given all this, I propose extending the Java to IDL mappings to support abstract interfaces by making the following changes to the orbos/98-04-03 spec: 1. In section 4.3 on page 24, remove numbered item 3. 2. In section 4.3 on page 24, in numbered item 4, change "in the interface" to "in the interface (including inherited methods)". 3. In section 4.4 on page 25, remove footnote 1 from numbered item 5. 4. In section 5.8 on page 42, first para after the bullets, change "IDL value type" to "IDL type". 5. In section 5.8 on page 42, replace last para by: Non-conforming Java classes are mapped to concrete IDL value types with no data members. Non-conforming Java interfaces are mapped to IDL abstract interface types if all their method definitions throw java.rmi.RemoteException, and to IDL abstract value types otherwise. 6. In section 5.8.3 on page 42, change "inherited value type" to "inherited type". 7. In section 5.8.4 on page 42, replace existing text by: For non-conforming Java interfaces that are mapped to IDL abstract interface types, methods and constants are mapped according to the rules specified in sections 5.4.4 and 5.4.5. For non-conforming Java classes and interfaces that are mapped to IDL value types, we do not specify a mapping for methods and constants. 8. In section 5.8.5 on page 43, add a Java type: public interface Bear { public int getSize() throws RemoteException; } and an IDL type: abstract interface Bear { long getSize(); }; 9. In section 7.4.4 on page 60, change the return type of the narrow method from java.rmi.Remote to java.lang.Object. In the description of narrow, change "object reference" to "object reference or local object". Simon -- Simon C Nash, IBM Java Technology Centre, Hursley, UK MailPoint 146, x245156 Tel. 01962 815156 or +44-1962-815156 Internet: nash@hursley.ibm.com Notes mail: Simon Nash@ibmgb