Issue 2532: Mapping of AbstractBase and abstract interfaces (java-rtf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: There is a problem with current mapping of abstract interface types to Java. These do not implement org.omg.CORBA.portable.IDLEntity. Even if they did, it would not be possible for the Java to IDL mapping to distinguish them from abstract valuetypes, which also map to Java interfaces that implement org.omg.CORBA.portable.IDLEntity. Resolution: Close, no change Revised Text: Actions taken: March 12, 1999: received issue October 3, 2001: closed issue Discussion: End of Annotations:===== Date: Fri, 12 Mar 1999 20:20:42 +0000 From: Simon Nash Organization: IBM X-Accept-Language: en To: issues@omg.org CC: java-rtf@omg.org, Bryan Atsatt , Steve Lewallen Subject: Mapping of AbstractBase and abstract interfaces There is a problem with current mapping of abstract interface types to Java. These do not implement org.omg.CORBA.portable.IDLEntity. Even if they did, it would not be possible for the Java to IDL mapping to distinguish them from abstract valuetypes, which also map to Java interfaces that implement org.omg.CORBA.portable.IDLEntity. Proposed Resolution: My proposal for issue 2296 is to add an AbstractBase native type to IDL. This should be mapped to the Java type package org.omg.CORBA.portable; public interface AbstractBase extends IDLEntity { } and IDL abstract interfaces should be mapped to Java interfaces that extend the AbstractBase interface. Revised Text: Add a new section before the current section 25.12.1.0.1. 25.12.1.1 CORBA::AbstractBase The native type CORBA::AbstractBase is mapped to the following Java type. package org.omg.CORBA.portable; public interface AbstractBase extends IDLEntity { } Change section 25.12.1.0.1 to 25.12.1.2. Replace the first paragraph of existing section 25.12.1.0.1 by: Abstract interfaces are mapped to a Java operations interface with the same name as the IDL interface. The Java interface extends org.omg.CORBA.portable.AbstractBase. Change section 25.12.1.1 to 25.12.1.3 In existing section 25.12.1.1, change the Java code for Base to: public interface Base extends org.omg.CORBA.portable.AbstractBase { void baseOp(); } Simon -- Simon C Nash, Technology Architect, IBM Java Technology Centre Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb Date: Thu, 18 Mar 1999 11:47:11 -0800 From: "Vijaykumar Natarajan" Reply-To: vijayn@inprise.com Organization: Inprise Corporation X-Accept-Language: en To: nash@hursley.ibm.com, java-rtf@omg.org Subject: AbstractBase issues: a solution? Hi Simon, I thought of a way to solve this problem w/o affecting CORBA objects and interfaces. Tell me what you think. AbstractBase still maps to Serializable, so the read and write abstract calls take a serializable, which means, it can take anything including CORBA Object and interfaces. However, abstract interfaces when mapped to java extend an interface called AbstractBase which extends IDL Entity. (Do we still need ValueBase to extends AbstractBase?) This should solve all issues of passing these things as arguments that are abstract base. What do you think? Date: Thu, 18 Mar 1999 20:33:47 +0000 From: Simon Nash Organization: IBM To: vijayn@inprise.com CC: java-rtf@omg.org Subject: Re: AbstractBase issues: a solution? References: <36F1583E.3D309658@inprise.com> Vijay, Vijaykumar Natarajan wrote: > > Hi Simon, > > I thought of a way to solve this problem w/o affecting CORBA objects > and > interfaces. Tell me what you think. > > AbstractBase still maps to Serializable, so the read and write > abstract > calls take a serializable, which means, it can take anything > including > CORBA Object and interfaces. > > However, abstract interfaces when mapped to java extend an interface > called AbstractBase which extends IDL Entity. (Do we still need > ValueBase to extends AbstractBase?) > I don't think so, since IDL AbstractBase will now map to > Serializable., and ValueBase extends IDLEntity which extends Serializable. > This should solve all issues of passing these things as arguments that > are abstract base. > > What do you think? > Good solution! Simon -- Simon C Nash, Technology Architect, IBM Java Technology Centre Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb Date: Thu, 18 Mar 1999 13:57:00 -0800 From: "Vijaykumar Natarajan" Reply-To: vijayn@inprise.com Organization: Inprise Corporation X-Accept-Language: en To: Simon Nash CC: java-rtf@omg.org Subject: Re: AbstractBase issues: a solution? References: <36F1583E.3D309658@inprise.com> <36F1632B.9BD1E5F0@hursley.ibm.com> Do we still need abstract values to extend ValueBase, though? vijay Simon Nash wrote: > Vijay, > > Vijaykumar Natarajan wrote: > > > > Hi Simon, > > > > I thought of a way to solve this problem w/o affecting CORBA objects and > > interfaces. Tell me what you think. > > > > AbstractBase still maps to Serializable, so the read and write abstract > > calls take a serializable, which means, it can take anything including > > CORBA Object and interfaces. > > > > However, abstract interfaces when mapped to java extend an interface > > called AbstractBase which extends IDL Entity. (Do we still need > > ValueBase to extends AbstractBase?) > > > I don't think so, since IDL AbstractBase will now map to Serializable., > and ValueBase extends IDLEntity which extends Serializable. > > > This should solve all issues of passing these things as arguments that > > are abstract base. > > > > What do you think? > > > Good solution! > > Simon > -- > Simon C Nash, Technology Architect, IBM Java Technology Centre > Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England > Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb Date: Thu, 18 Mar 1999 23:18:57 +0000 From: Simon Nash Organization: IBM To: vijayn@inprise.com CC: java-rtf@omg.org Subject: Re: AbstractBase issues: a solution? References: <36F1583E.3D309658@inprise.com> <36F1632B.9BD1E5F0@hursley.ibm.com> <36F176AC.9A7339F8@inprise.com> Vijay, Yes we do. If IDL ValueBase maps to Java ValueBase, and I have a nethod whose parameter signature is ValueBase in IDL, I need to be able to pass abstract values through it. Also, the Java->IDL mapping needs to generate a nonboxed IDL entity for an abstract value IDLEntity type instead of the normal boxed IDL entity. The ValueBase marker interface allows it to do this. Simon Vijaykumar Natarajan wrote: > > Do we still need abstract values to extend ValueBase, though? > > vijay > > Simon Nash wrote: > > > Vijay, > > > > Vijaykumar Natarajan wrote: > > > > > > Hi Simon, > > > > > > I thought of a way to solve this problem w/o affecting CORBA > objects and > > > interfaces. Tell me what you think. > > > > > > AbstractBase still maps to Serializable, so the read and write > abstract > > > calls take a serializable, which means, it can take anything > including > > > CORBA Object and interfaces. > > > > > > However, abstract interfaces when mapped to java extend an > interface > > > called AbstractBase which extends IDL Entity. (Do we still need > > > ValueBase to extends AbstractBase?) > > > > > I don't think so, since IDL AbstractBase will now map to > Serializable., > > and ValueBase extends IDLEntity which extends Serializable. > > > > > This should solve all issues of passing these things as > arguments that > > > are abstract base. > > > > > > What do you think? > > > > > Good solution! > > > > Simon > > -- > > Simon C Nash, Technology Architect, IBM Java Technology Centre > > Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England > > Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb -- Simon C Nash, Technology Architect, IBM Java Technology Centre Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb Date: Sat, 20 Mar 1999 22:06:11 +0000 From: Simon Nash Organization: IBM To: vijayn@inprise.com CC: java-rtf@omg.org Subject: Re: AbstractBase issues: a solution? References: <36F1583E.3D309658@inprise.com> Vijay, I thought about this some more and I think I slightly misstated the IDL semantics that need to be supported in Java. AbstractBase is the implict supertype of all IDL abstract interfaces, just like Object is the implicit supertype of all regular interfaces. However, AbstractBase is not a supertype of Object, nor is it a supertype of regular interfaces, unless they inherit from an abstract interface. Similarly it is not a supertype of ValueBase. Here's the IDL type hierarchy: Object any regular interface derived regular interface regular valuetype that supports interface abstract valuetype that supports interface ValueBase any regular valuetype derived regular valuetype any abstract valuetype derived abstract valuetype derived regular valuetype AbstractBase any abstract interface derived regular interface regular valuetype that supports abstract interface abstract valuetype that supports abstract interface So for example, if I have a method void foo(in AbstractBase bar); and types abstract interface face1 { void xyz(); }; interface face2 : face1 { long abc(); }; valuetype value1 : face1 { public char x; }; interface face3 { void run(); }; valuetype value2 { public long z; }; then the language mappings must allow me to pass face1, face2, and value1 through method foo, but need not allow me to pass face3 or value2. If you agree with this, then there is no need for AbstractBase to map to Serializable. It could map to AbstractBase, since that is a marker interface inherited by all abstract interfaces. However, mapping it to Serializable would not cause any problems, since Serializable is a supertype of AbstractBase. What do you think? Simon Vijaykumar Natarajan wrote: > > Hi Simon, > > I thought of a way to solve this problem w/o affecting CORBA objects > and > interfaces. Tell me what you think. > > AbstractBase still maps to Serializable, so the read and write > abstract > calls take a serializable, which means, it can take anything > including > CORBA Object and interfaces. > > However, abstract interfaces when mapped to java extend an interface > called AbstractBase which extends IDL Entity. (Do we still need > ValueBase to extends AbstractBase?) > > This should solve all issues of passing these things as arguments > that > are abstract base. > > What do you think? -- Simon C Nash, Technology Architect, IBM Java Technology Centre Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb Date: Tue, 11 Jan 2000 09:14:59 +0000 From: Simon Nash Organization: IBM X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: Vijaykumar Natarajan CC: Jeffrey Mischkinsky , mleland@fpk.hp.com, honi@fsc.fujitsu.com, michi@ooc.com.au, oriordan@iona.com, jeff@persistence.com, dheisser@Eng.Sun.COM, java-rtf@omg.org Subject: Re: IDL/Java y2k Vote 1 Announcement References: <200001101002.CAA16358@wheel.dcn.davis.ca.us> <387A7048.16B19B53@inprise.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: 5B1!!U$Ge9l0B!!@b > Hi All, > > I was looking through the archives for issue > Issue 2532: Mapping of AbstractBase and abstract interfaces > (java-rtf) > and the resolution does not reflect the discussion in the archives. > The conclusion per the archive appears to be to map abstract > interfaces to either > Serializable or to AbstractBase. Any reason for moving away from > that? > There was some face to face discussion between myself and Jeff (when > he worked for Inprise) that does not appear in the archives. We > concluded that mapping abstract interfaces to IDLEntity was sufficient for the > reverse mapping to identify them correctly. The rule is that if a Java type is an interface, and inherits from IDLEntity, and does not inherit from ValueBase, and does not inherit from CORBA.Object then it has been mapped from an IDL abstract interface. No special marker such as AbstractBase is needed. Indeed, such a marker would not be useful since a regular interface inheriting from an abstract interface would also have this marker. Simon -- Simon C Nash, Technology Architect, IBM Java Technology Centre Tel. +44-1962-815156 Fax +44-1962-818999 Hursley, England Internet: nash@hursley.ibm.com Lotus Notes: Simon Nash@ibmgb XSXC Date: Tue, 22 May 2001 13:32:06 -0400 From: Mary Leland X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Java RTF Subject: Issue 2532 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: UC!"!YIpd9D-5e9L!D!! All (especially Simon): In the last message in the archive (http://cgi.omg.org/issues/issue2532.txt), Simon wrote > There was some face to face discussion between myself and Jeff (when he > worked for Inprise) that does not appear in the archives. We concluded that > mapping abstract interfaces to IDLEntity was sufficient for the reverse > mapping to identify them correctly. The rule is that if a Java type > is an interface, and > inherits from IDLEntity, and > does not inherit from ValueBase, and > does not inherit from CORBA.Object > then it has been mapped from an IDL abstract interface. > > No special marker such as AbstractBase is needed. Indeed, such a > marker > would not be useful since a regular interface inheriting from an > abstract > interface would also have this marker. Does that mean that we can close this issue with no change, or do we need to do something about abstract interfaces and IDLEntity? If the latter, would someone care to formulate a proposal (relative to the latest version of the chapter, ptc/2000-11-03) ? Thanks, Mary Date: Tue, 22 May 2001 23:45:00 +0100 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: Mary Leland CC: Java RTF , vnatarajan@borland.com Subject: Re: Issue 2532 References: <3B0AA296.CE8E576F@fpk.hp.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: 3O8e9KTPd9gW > All (especially Simon): > > In the last message in the archive (http://cgi.omg.org/issues/issue2532.txt), > Simon wrote > > There was some face to face discussion between myself and Jeff (when he > > worked for Inprise) that does not appear in the archives. We concluded that > > mapping abstract interfaces to IDLEntity was sufficient for the reverse > > mapping to identify them correctly. The rule is that if a Java type > > is an interface, and > > inherits from IDLEntity, and > > does not inherit from ValueBase, and > > does not inherit from CORBA.Object > > then it has been mapped from an IDL abstract interface. > > > > No special marker such as AbstractBase is needed. Indeed, such a > > marker > > would not be useful since a regular interface inheriting from an > > abstract > > interface would also have this marker. > > Does that mean that we can close this issue with no change, or > do we need to do something about abstract interfaces and IDLEntity? > > If the latter, would someone care to formulate a proposal (relative > to the latest version of the chapter, ptc/2000-11-03) ? > > Thanks, > Mary -- 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: Tue, 22 May 2001 18:45:35 -0700 From: Vijaykumar Natarajan Subject: Re: Issue 2532 To: Simon Nash Cc: Mary Leland , Java RTF , vnatarajan@borland.com Message-id: <3B0B163F.DC1F118F@inprise.com> Organization: Borland Software Corporation MIME-version: 1.0 X-Mailer: Mozilla 4.51 [en]C-CCK-MCD (WinNT; U) X-Accept-Language: en References: <3B0AA296.CE8E576F@fpk.hp.com> <3B0AEBEC.46A4C731@hursley.ibm.com> Content-Type: multipart/mixed; boundary="Boundary_(ID_MIuXMy3oRYVvvr+L5WEsSA)" X-UIDL: &[Pd96]fd9miPd9h8V!! Status: RO Hi all, I agree. This should be closed no change. Vijay Simon Nash wrote: > > Mary, > I think this can be closed no change. Vijay, do you agree? > > Simon > > Mary Leland wrote: > > > > All (especially Simon): > > > > In the last message in the archive (http://cgi.omg.org/issues/issue2532.txt), > > Simon wrote > > > There was some face to face discussion between myself and Jeff (when he > > > worked for Inprise) that does not appear in the archives. We concluded that > > > mapping abstract interfaces to IDLEntity was sufficient for the reverse > > > mapping to identify them correctly. The rule is that if a Java type > > > is an interface, and > > > inherits from IDLEntity, and > > > does not inherit from ValueBase, and > > > does not inherit from CORBA.Object > > > then it has been mapped from an IDL abstract interface. > > > > > > No special marker such as AbstractBase is needed. Indeed, such a > > > marker > > > would not be useful since a regular interface inheriting from an > > > abstract > > > interface would also have this marker. > > > > Does that mean that we can close this issue with no change, or > > do we need to do something about abstract interfaces and IDLEntity? > > > > If the latter, would someone care to formulate a proposal (relative > > to the latest version of the chapter, ptc/2000-11-03) ? > > > > Thanks, > > Mary > > -- > 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 -- ------- Don't forget to vote in JDJ Readers' Choice Awards: http://www2.sys-con.com/java/readerschoice2001 or vote for all Borland's nominations in one go: http://www.borland.com/jdjvote.html This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately and permanently delete the original and any copy of any e-mail and any printout thereof. [] vnatarajan2.vcf Date: Tue, 05 Jun 2001 13:34:57 -0400 From: Mary Leland X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Java RTF Cc: Vijaykumar Natarajan Subject: VOTE: IDL to Java RTF Issue 2532. Due June 13, 2001 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: ([U!!*RPe94iad9H`kd9 Proposal: Close Issue 2532 with No Change Votes Due: 5 pm EDT (US), June 13, 2001 Issue 2532: Mapping of AbstractBase and abstract interfaces There is a problem with current mapping of abstract interface types to Java. These do not implement org.omg.CORBA.portable.IDLEntity. Even if they did, it would not be possible for the Java to IDL mapping to distinguish them from abstract valuetypes, which also map to Java interfaces that implement org.omg.CORBA.portable.IDLEntity. Rationale: See email archive at http://cgi.omg.org/issues/issue2532.txt