Issue 1672: Does object reference == ObjectImpl? (java-rtf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: The issue is whether or not code that calls the _this_object method of the org.omg.PortableServer.Servant class (which is declared to return an org.omg.CORBA.Object type) can assume that the result of calling _this_object can be safely cast to ObjectImpl. The decision of the RTF was that this is a safe assumption, but no change is necessary to the spec because it is already clearly stated that all stubs (object references) must be subclasses of ObjectImpl. Resolution: closed issue Revised Text: Actions taken: July 13, 1998: received issue July 30, 1998: closed issue Discussion: End of Annotations:===== Return-Path: Date: Mon, 13 Jul 1998 11:13:21 +0100 From: Simon Nash Reply-To: nash@hursley.ibm.com Organization: IBM To: java-rtf@omg.org Subject: Does object reference == ObjectImpl? I found the note I thought I had sent on this subject, which we discussed on the Java RTF call last Thursday. The issue is whether or not code that calls the _this_object method of the org.omg.PortableServer.Servant class (which is declared to return an org.omg.CORBA.Object type) can assume that the result of calling _this_object can be safely cast to ObjectImpl. The decision of the RTF was that this is a safe assumption, but no change is necessary to the spec because it is already clearly stated that all stubs (object references) must be subclasses of ObjectImpl. I'm recording this decision here for reference. 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 Return-Path: From: thomasae@kben.co.uk (Alex Thomas) To: nash@hursley.ibm.com Cc: java-rtf@omg.org Subject: Re: Does object reference == ObjectImpl? Date: Mon, 13 Jul 1998 21:23:12 GMT References: <35A9DDC1.52D547F@mailserver.hursley.ibm.com> Forgive me for butting in, but I recognise this question! :-) For what it's worth, I think it's clear that CORBA objects and programming language objects are different animals representing two different levels of abstraction. It's therefore wrong to relate them by subtyping and allow casting between them. However, there's nothing to stop one defining a special operation to derive the 'physical' programming language object from the 'logical' CORBA reference, one should just keep in mind that this is a rather implementation-specific act - if that object were replicated then the CORBA ref might map to many physical references (OK, they wouldn't be reachable by simple pointers, but you get the idea I hope). I believe a similar argument was advanced (bypassing security?) for not allowing intra-ORB calls to use the native reference in the latest revision. I think the layered models of the meta-level architecture research community, or the computational and engineering objects of RM-ODP are good examples here. These models are based on formally defined layers with particular object semantics for each layer. I think that's where CORBA should head, on the grounds that this will actually make life easier for the average developer as more sophisticated ORBs with more flexible mappings are produced. Best regards Alex Thomas Dresdner Kleinwort Benson 20 Fenchurch St London EC3P 3DB thomasae@kben.co.uk On Mon, 13 Jul 1998 11:13:21 +0100, you wrote: >I found the note I thought I had sent on this subject, which we >discussed on the Java RTF call last Thursday. > >The issue is whether or not code that calls the _this_object method >of the org.omg.PortableServer.Servant class (which is declared to >return an org.omg.CORBA.Object type) can assume that the result >of calling _this_object can be safely cast to ObjectImpl. > >The decision of the RTF was that this is a safe assumption, but no >change is necessary to the spec because it is already clearly stated >that all stubs (object references) must be subclasses of ObjectImpl. > >I'm recording this decision here for reference. > > Simon