`Architecture and Specification
`
`Revision 2.0
`July 1995
`
`1
`
`
`
`Copyright 1995 BNR Europe Ltd
`Copyright 1991, 1992, 1995 by Digital Equipment Corporation
`Copyright 1995 Expersoft Corporation
`Copyright 1989, 1990, 1991, 1992, 1995 by Hewlett-Packard Company
`Copyright 1991, 1992, 1995 by HyperDesk Corporation
`Copyright 1995 IBM Corporation
`Copyright 1995 ICL, plc
`Copyright 1995 IONA Technologies Ltd
`Copyright 1991, 1992, 1995 by NCR Corporation
`Copyright 1995 Novell USG
`Copyright 1991,1992, 1995 by Object Design, Inc.
`Copyright 1991, 1992, 1995 Object Management Group, Inc.
`Copyright 1991, 1992, 1995 by Sun Microsystems, Inc.
`Copyright 1995 SunSoft, Inc
`
`BNR Europe Ltd, Expersoft Corporation, IBM Corporation, ICL plc, IONA Technologies Ltd, Digital Equip-
`ment Corporation, Hewlett-Packard Company, HyperDesk Corporation, NCR Corporation, Novell USG,
`Object Design, Inc., Sun Microsystems, Inc., SunSoft, Inc, hereby grant to the Object Management Group, Inc.
`a non-exclusive, royalty-free, paid up, worldwide license to copy and distribute this document and to modify
`this document and distribute copies of the modified version.
`
`Each of the copyright holders listed above agrees that not person shall be deemed to have infringed any copyright,
`patent or any other proprietary right of any such copyright holder by reason of having used the specification set forth
`herein or having conformed any computer software to the specification.
`
`The information contained in this document is subject to change without notice.
`
`NOTICE
`
`The material in this document details an Object Management Group specification in accordance with the license and
`notices set forth on this page. This document does not represent a commitment to implement any portion of this spec-
`ification in any companies' products.
`
`WHILE THE INFORMATION IN THIS PUBLICATION IS BELIEVED TO BE ACCURATE,
`THE OBJECT MANAGEMENT GROUP, DIGITAL EQUIPMENT CORPORATION,
`HEWLETT-PACKARD COMPANY, HYPERDESK CORPORATION, NCR CORPORATION, OBJECT DESIGN,
`INC., SUN MICROSYSTEMS, INC., AND X/OPEN CO. LTD., MAKE NO WARRANTY OF ANY KIND WITH
`REGARDS TO THIS MATERIAL INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
`MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The Object Management Group, Inc.,
`Digital Equipment Corporation, Hewlett-Packard Company, HyperDesk Corporation, NCR Corporation, Object
`Design, Inc., Sun Microsystems, Inc., and X/Open Co. Ltd. shall not be liable for errors contained herein or for inci-
`dental or consequential damages in connection with the furnishing, performance or use of this material.
`
`The copyright holders listed above acknowledge that the Object Management Group (acting itself or through its des-
`ignees) is and shall at all times be the sole entity that may authorize developers, suppliers and sellers of computer
`software to use certification marks, trademarks or other special designations to indicate compliance with these mate-
`rials.
`
`This document contains information which is protected by copyright. All Rights Reserved. No part of this work cov-
`ered by copyright hereon may be reproduced or used in any form or by any means--graphic, electronic or mechanical,
`including photocopying, recording, taping, or information storage and retrieval systems--without permission of the
`copyright owner.
`
`2
`
`
`
`RESTRICTED RIGHTS LEGEND. Use, duplication, or disclosure by government is subject to restrictions as set forth in
`subdivision (c) (1) (ii) of the Right in Technical Data and Computer Software Clause at DFARS 252.227.7013.
`
`Hewlett-Packard Company is a trademark of Hewlett-Packard Company
`HyperDesk is a trademark of HyperDesk Corporation
`Smalltalk/V is a registered trademark of Digitalk, Inc.
`SunSoft is a trademark of Sun Microsystems, Inc., licensed to SunSoft, Inc.
`
`X/Open and the "X" symbol are trademarks of X/Open Company Limited
`VisualAge is a trademark of International Business Machines Corporation
`VisualWorks is registered trademark of ParcPlace Systems, Inc.
`
`Other names, products, and services may be the trademarks or registered trademarks of their respective holders.
`
`3
`
`
`
`4
`
`
`
`Table of Contents
`
`0.1 About This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`0.1.1 Object Management Group. . . . . . . . . . . . . . . .
`0.1.2 X/Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`0.2
`0.3 Context of CORBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`0.4 Associated Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`0.5
`Structure of this Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . .
`0.6 Definition of CORBA Compliance. . . . . . . . . . . . . . . . . . . .
`0.7 Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . .
`0.8 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`1. The Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.2 Object Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.2.1 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.2.2
`Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.2.3 Object Creation and Destruction. . . . . . . . . . . .
`1.2.4
`Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.2.5
`Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.2.6 Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.2.7 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.3 Object Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`1.3.1
`The Execution Model: Performing Services . . .
`1.3.2
`The Construction Model . . . . . . . . . . . . . . . . . .
`
` CORBA V2.0 July 1995
`
`iii
`iii
`iv
`iv
`iv
`v
`vi
`vii
`viii
`viii
`
`1-1
`1-1
`1-2
`1-2
`1-2
`1-3
`1-4
`1-5
`1-5
`1-7
`1-7
`1-7
`1-8
`
`iii
`
`5
`
`
`
`2-1
`2. CORBA Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`2-1
`2.1
` Structure of an Object Request Broker . . . . . . . . . . . . . . . .
`2-5
`2.1.1
` Object Request Broker. . . . . . . . . . . . . . . . . . .
`2-6
`2.1.2
`Clients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`2-6
`2.1.3 Object Implementations . . . . . . . . . . . . . . . . . .
`2-6
`2.1.4 Object References. . . . . . . . . . . . . . . . . . . . . . .
`2-7
`2.1.5
` OMG Interface Definition Language . . . . . . . .
`2.1.6 Mapping of OMG IDL to Programming Languages
`2-7
`2-8
` Client Stubs . . . . . . . . . . . . . . . . . . . . . . . . . . .
`2.1.7
`2-8
`2.1.8 Dynamic Invocation Interface. . . . . . . . . . . . . .
`2-8
`2.1.9
` Implementation Skeleton . . . . . . . . . . . . . . . . .
`2-8
`2.1.10 Dynamic Skeleton Interface . . . . . . . . . . . . . . .
`2-9
`2.1.11 Object Adapters . . . . . . . . . . . . . . . . . . . . . . . .
`2-9
`2.1.12 ORB Interface. . . . . . . . . . . . . . . . . . . . . . . . . .
`2-9
`2.1.13 Interface Repository . . . . . . . . . . . . . . . . . . . . .
`2.1.14 Implementation Repository. . . . . . . . . . . . . . . . 2-10
`2.2 Example ORBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
`2.2.1
`Client- and Implementation-resident ORB . . . . 2-10
`2.2.2
`Server-based ORB . . . . . . . . . . . . . . . . . . . . . . 2-10
`2.2.3
`System-based ORB . . . . . . . . . . . . . . . . . . . . . . 2-10
`2.2.4
`Library-based ORB. . . . . . . . . . . . . . . . . . . . . . 2-10
`Structure of a Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
`2.3
`Structure of an Object Implementation . . . . . . . . . . . . . . . . 2-12
`2.4
`Structure of an Object Adapter. . . . . . . . . . . . . . . . . . . . . . . 2-14
`2.5
`2.6 Example Object Adapters. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
`2.6.1
`Basic Object Adapter . . . . . . . . . . . . . . . . . . . . 2-16
`2.6.2
`Library Object Adapter. . . . . . . . . . . . . . . . . . . 2-16
`2.6.3 Object-Oriented Database Adapter . . . . . . . . . . 2-16
`2.7 The Integration of Foreign Object Systems . . . . . . . . . . . . . 2-16
`
`3. OMG IDL Syntax and Semantics. . . . . . . . . . . . . . . . . . . . .
`3.1 About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`3.2 Lexical Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`3.2.1
`Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`3.2.2
`Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`3.2.3
`Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`3.2.4 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`3.2.5
`Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`3.3
`
`3-1
`3-1
`3-2
`3-5
`3-5
`3-5
`3-6
`3-6
`3-8
`
`iv
`
` CORBA V2.0 July 1995
`
`6
`
`
`
`3-9
`3.4 OMG IDL Grammar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`3.5 OMG IDL Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
`3.5.1 Module Declaration . . . . . . . . . . . . . . . . . . . . . 3-13
`3.5.2
`Interface Declaration . . . . . . . . . . . . . . . . . . . . 3-13
`Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
`3.6
`3.7 Constant Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
`3.7.1
`Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
`3.7.2
`Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
`3.8 Type Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
`3.8.1
`Basic Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
`3.8.2
`Constructed Types . . . . . . . . . . . . . . . . . . . . . . 3-22
`3.8.3
`Template Types. . . . . . . . . . . . . . . . . . . . . . . . . 3-25
`3.8.4
`Complex Declarator . . . . . . . . . . . . . . . . . . . . . 3-26
`3.9 Exception Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
`3.10 Operation Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27
`3.10.1 Operation Attribute. . . . . . . . . . . . . . . . . . . . . . 3-28
`3.10.2 Parameter Declarations. . . . . . . . . . . . . . . . . . . 3-28
`3.10.3 Raises Expressions . . . . . . . . . . . . . . . . . . . . . . 3-29
`3.10.4 Context Expressions . . . . . . . . . . . . . . . . . . . . . 3-29
`3.11 Attribute Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
`3.12 CORBA Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
`3.13 Names and Scoping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
`3.14 Differences from C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
`3.15 Standard Exceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
`3.15.1 Standard Exceptions Definitions . . . . . . . . . . . 3-34
`3.15.2 Object Non-Existence. . . . . . . . . . . . . . . . . . . . 3-35
`
`4. Dynamic Invocation Interface . . . . . . . . . . . . . . . . . . . . . . .
`4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`4.1.1
`Common Data Structures . . . . . . . . . . . . . . . . .
`4.1.2 Memory Usage . . . . . . . . . . . . . . . . . . . . . . . . .
`4.1.3
`Return Status and Exceptions . . . . . . . . . . . . . .
`4.2 Request Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`4.2.1
`create_request . . . . . . . . . . . . . . . . . . . . . . . . . .
`4.2.2
`add_arg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`4.2.3
`invoke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`4.2.4
`delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`4.3 Deferred Synchronous Operations . . . . . . . . . . . . . . . . . . . .
`4.3.1
`send. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`CORBA V2.0 July 1995
`
`4-1
`4-1
`4-1
`4-3
`4-3
`4-4
`4-4
`4-6
`4-7
`4-7
`4-7
`4-7
`
`v
`
`7
`
`
`
`4-8
`send_multiple_requests. . . . . . . . . . . . . . . . . . .
`4.3.2
`4-9
`get_response . . . . . . . . . . . . . . . . . . . . . . . . . . .
`4.3.3
`4-9
`get_next_response . . . . . . . . . . . . . . . . . . . . . .
`4.3.4
`4.4 List Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
`4.4.1
`create_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
`4.4.2
`add_item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
`4.4.3
`free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
`4.4.4
`free_memory. . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
`4.4.5
`get_count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
`4.4.6
`create_operation_list. . . . . . . . . . . . . . . . . . . . . 4-12
`4.5 Context Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
`4.6 Context Object Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
`4.6.1
`get_default_context . . . . . . . . . . . . . . . . . . . . . 4-14
`4.6.2
`set_one_value . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
`4.6.3
`set_values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
`4.6.4
`get_values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
`4.6.5
`delete_values . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
`4.6.6
`create_child . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
`4.6.7
`delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
`4.7 Native Data Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
`
`5-1
`5. Dynamic Skeleton Interface . . . . . . . . . . . . . . . . . . . . . . . . .
`5-2
`5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`5-2
`5.2 Explicit Request State: ServerRequest Pseudo Object . . . . .
`5-3
`5.3 Dynamic Skeleton Interface: Language Mapping . . . . . . . .
`5.3.1
`ServerRequest’s Handling of Operation Parameters
`5-3
`Registering Dynamic Implementation Routines
`
`5.3.2
`
`5-4
`
`6. The Interface Repository . . . . . . . . . . . . . . . . . . . . . . . . . . .
`6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`6.2
`Scope of an Interface Repository . . . . . . . . . . . . . . . . . . . . .
`6.3
`Implementation Dependencies . . . . . . . . . . . . . . . . . . . . . . .
`6.3.1 Managing Interface Repositories . . . . . . . . . . .
`6.4 Basics of the Interface Repository Interface. . . . . . . . . . . . .
`6.4.1 Names and Identifiers . . . . . . . . . . . . . . . . . . . .
`6.4.2
`Types and TypeCodes . . . . . . . . . . . . . . . . . . . .
`6.4.3
`Interface Objects. . . . . . . . . . . . . . . . . . . . . . . .
`6.4.4
`Structure and Navigation of Interface Objects .
`Interface Repository Interfaces . . . . . . . . . . . . . . . . . . . . . .
`
`6.5
`
`6-1
`6-1
`6-2
`6-3
`6-4
`6-5
`6-5
`6-5
`6-5
`6-6
`6-7
`
`vi
`
` CORBA V2.0 July 1995
`
`8
`
`
`
`6-8
`Supporting Type Definitions . . . . . . . . . . . . . . .
`6.5.1
`6-9
`IRObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`6.5.2
`6-9
`Contained . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`6.5.3
`Container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
`6.5.4
`IDLType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
`6.5.5
`Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
`6.5.6
`6.5.7 ModuleDef . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17
`6.5.8
`ConstantDef Interface. . . . . . . . . . . . . . . . . . . . 6-17
`6.5.9
`TypedefDef Interface . . . . . . . . . . . . . . . . . . . . 6-18
`6.5.10 StructDef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
`6.5.11 UnionDef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
`6.5.12 EnumDef. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20
`6.5.13 AliasDef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
`6.5.14 Read Interface. . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
`6.5.15 PrimitiveDef . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
`6.5.16 StringDef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22
`6.5.17 SequenceDef. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22
`6.5.18 ArrayDef. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23
`6.5.19 ExceptionDef . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23
`6.5.20 AttributeDef . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-24
`6.5.21 OperationDef . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25
`6.5.22 InterfaceDef . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-27
`6.6 RepositoryIds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
`6.6.1 OMG IDL Format. . . . . . . . . . . . . . . . . . . . . . . 6-30
`6.6.2 DCE UUID Format. . . . . . . . . . . . . . . . . . . . . . 6-30
`6.6.3
`LOCAL Format . . . . . . . . . . . . . . . . . . . . . . . . 6-30
`6.6.4
`Pragma Directives for RepositoryId . . . . . . . . . 6-31
`6.7 TypeCodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-33
`6.7.1
`The TypeCode Interface . . . . . . . . . . . . . . . . . . 6-34
`6.7.2
`TypeCode Constants . . . . . . . . . . . . . . . . . . . . . 6-38
`6.7.3
`Creating TypeCodes . . . . . . . . . . . . . . . . . . . . . 6-39
`6.8 OMG IDL for Interface Repository . . . . . . . . . . . . . . . . . . . 6-41
`
`7. ORB Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`7.1 Converting Object References to Strings . . . . . . . . . . . . . . .
`7.2 Object Reference Operations . . . . . . . . . . . . . . . . . . . . . . . .
`7.2.1 Determining the Object Implementation and
`Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`7.2.2 Duplicating and Releasing Copies of Object
`References . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`7.2.3 Nil Object References. . . . . . . . . . . . . . . . . . . .
`
`CORBA V2.0 July 1995
`
`7-1
`7-1
`7-2
`
`7-3
`
`7-3
`7-4
`
`vii
`
`9
`
`
`
`7-4
`Equivalence Checking Operation . . . . . . . . . . .
`7.2.4
`7-4
`Probing for Object Non-Existence . . . . . . . . . .
`7.2.5
`7-5
`7.2.6 Object Reference Identity . . . . . . . . . . . . . . . . .
`7.3 Overview: ORB and OA Initialization and Initial References 7-6
`7.4 ORB Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`7-6
`7.5 OA and BOA Initialization. . . . . . . . . . . . . . . . . . . . . . . . . .
`7-8
`7.6 Obtaining Initial Object References . . . . . . . . . . . . . . . . . . . 7-10
`
`8-1
`8. The Basic Object Adapter. . . . . . . . . . . . . . . . . . . . . . . . . . .
`8-1
`8.1 Role of the Basic Object Adapter. . . . . . . . . . . . . . . . . . . . .
`8-3
`8.2 Basic Object Adapter Interface . . . . . . . . . . . . . . . . . . . . . .
`8-5
`8.2.1
`Registration of Implementations. . . . . . . . . . . .
`8.2.2 Activation and Deactivation of Implementations 8-5
`8.2.3 Generation and Interpretation of Object References
`8-8
`8-9
`8.2.4 Authentication and Access Control. . . . . . . . . .
`8.2.5
`Persistent Storage . . . . . . . . . . . . . . . . . . . . . . . 8-10
`Appendix A
`Standard OMG IDL Types . . . . . . . . . . . . . . . . . .
` A-1
`
`9.
`
`9-1
` Interoperability Overview . . . . . . . . . . . . . . . . . . . . . . . . . .
`9-1
`9.1 Elements of Interoperability. . . . . . . . . . . . . . . . . . . . . . . . .
`9-1
`9.1.1 ORB Interoperability Architecture . . . . . . . . . .
`9-2
`9.1.2
`Inter-ORB Bridge Support . . . . . . . . . . . . . . . .
`9-2
`9.1.3 General Inter-ORB Protocol (GIOP) . . . . . . . .
`9-3
`9.1.4
`Internet Inter-ORB Protocol (IIOP) . . . . . . . . .
`9.1.5
`Environment-Specific Inter-ORB Protocols (ESIOPs)
`9-4
`9-4
`9.2 Relationship to Previous Versions of CORBA . . . . . . . . . . .
`9-4
`9.3 Examples of Interoperability Solutions . . . . . . . . . . . . . . . .
`9-5
`9.3.1
`Example 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`9-5
`9.3.2
`Example 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`9-5
`9.3.3
`Example 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`9-5
`9.3.4
`Interoperability Compliance . . . . . . . . . . . . . . .
`9-8
`9.4 Motivating Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`9-8
`9.4.1 ORB Implementation Diversity . . . . . . . . . . . .
`9-8
`9.4.2 ORB Boundaries. . . . . . . . . . . . . . . . . . . . . . . .
`9-9
`9.4.3 ORBs Vary in Scope, Distance, and Lifetime . .
`9-9
`Interoperability Design Goals . . . . . . . . . . . . . . . . . . . . . . .
`9.5.1 Non-Goals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10
`
`9.5
`
`viii
`
` CORBA V2.0 July 1995
`
`10
`
`
`
`10. ORB Interoperability Architecture . . . . . . . . . . . . . . . . . . . 10-1
`10.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1
`10.1.1 Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1
`10.1.2 Bridging Domains. . . . . . . . . . . . . . . . . . . . . . . 10-2
`10.2 ORBs and ORB Services . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
`10.2.1 The Nature of ORB Services . . . . . . . . . . . . . . 10-3
`10.2.2 ORB Services and Object Requests . . . . . . . . . 10-3
`10.2.3 Selection of ORB Services . . . . . . . . . . . . . . . . 10-4
`10.3 Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
`10.3.1 Definition of a Domain . . . . . . . . . . . . . . . . . . . 10-5
`10.3.2 Mapping Between Domains: Bridging . . . . . . . 10-6
`10.4 Interoperability Between ORBs . . . . . . . . . . . . . . . . . . . . . . 10-6
`10.4.1 ORB Services and Domains . . . . . . . . . . . . . . . 10-7
`10.4.2 ORBs and Domains . . . . . . . . . . . . . . . . . . . . . 10-7
`10.4.3 Interoperability Approaches . . . . . . . . . . . . . . . 10-8
`10.4.4 Policy-Mediated Bridging. . . . . . . . . . . . . . . . . 10-10
`10.4.5 Configurations of Bridges in Networks. . . . . . . 10-10
`10.5 Object Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11
`10.5.1 Domain-relative Object Referencing . . . . . . . . 10-12
`10.5.2 Handling of Referencing Between Domains. . . 10-12
`10.6 An Information Model for Object References . . . . . . . . . . . 10-14
`10.6.1 What Information do Bridges Need? . . . . . . . . 10-14
`10.6.2 Interoperable Object References: IORs . . . . . . 10-14
`10.6.3 Profile and Component Composition in IORs. . 10-16
`10.6.4 IOR Creation and Scope . . . . . . . . . . . . . . . . . . 10-17
`10.6.5 Stringified Object References . . . . . . . . . . . . . . 10-17
`10.6.6 Object Service Context . . . . . . . . . . . . . . . . . . . 10-18
`
`11. Building Inter-ORB Bridges . . . . . . . . . . . . . . . . . . . . . . . . . 11-1
`11.1 In-Line and Request-Level Bridging . . . . . . . . . . . . . . . . . . 11-1
`11.1.1 In-line Bridging . . . . . . . . . . . . . . . . . . . . . . . . 11-2
`11.1.2 Request-level bridging . . . . . . . . . . . . . . . . . . . 11-3
`11.1.3 Collocated ORBs . . . . . . . . . . . . . . . . . . . . . . . 11-4
`11.2 Proxy Creation and Management . . . . . . . . . . . . . . . . . . . . . 11-4
`11.3 Interface-specific Bridges and Generic Bridges . . . . . . . . . . 11-5
`11.4 Building Generic Request-Level Bridges. . . . . . . . . . . . . . . 11-5
`11.5 Bridging Non-Referencing Domains . . . . . . . . . . . . . . . . . . 11-6
`11.6 Bootstrapping Bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7
`
`CORBA V2.0 July 1995
`
`ix
`
`11
`
`
`
`12. General Inter-ORB Protocol. . . . . . . . . . . . . . . . . . . . . . . . . 12-1
`12.1 Goals of the General Inter-ORB Protocol . . . . . . . . . . . . . . 12-1
`12.2 General Inter-ORB Protocol Overview . . . . . . . . . . . . . . . . 12-2
`12.2.1 Common Data Representation (CDR) . . . . . . . 12-2
`12.2.2 GIOP Message Overview . . . . . . . . . . . . . . . . . 12-3
`12.2.3 GIOP Message Transfer . . . . . . . . . . . . . . . . . . 12-3
`12.3 CDR Transfer Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4
`12.3.1 Primitive Types. . . . . . . . . . . . . . . . . . . . . . . . . 12-4
`12.3.2 OMG IDL Constructed Types. . . . . . . . . . . . . . 12-8
`12.3.3 Encapsulation . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
`12.3.4 Pseudo-Object Types . . . . . . . . . . . . . . . . . . . . 12-9
`12.3.5 Object References. . . . . . . . . . . . . . . . . . . . . . . 12-15
`12.4 GIOP Message Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-15
`12.4.1 GIOP Message Header . . . . . . . . . . . . . . . . . . . 12-15
`12.4.2 Reply Message . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
`12.4.3 CancelRequest Message . . . . . . . . . . . . . . . . . . 12-20
`12.4.4 LocateRequest Message . . . . . . . . . . . . . . . . . . 12-21
`12.4.5 LocateReply Message . . . . . . . . . . . . . . . . . . . . 12-21
`12.4.6 CloseConnection Message . . . . . . . . . . . . . . . . 12-23
`12.4.7 MessageError Message. . . . . . . . . . . . . . . . . . . 12-23
`12.5 GIOP Message Transport . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-23
`12.5.1 Connection Management . . . . . . . . . . . . . . . . . 12-24
`12.5.2 Message Ordering. . . . . . . . . . . . . . . . . . . . . . . 12-25
`12.6 Object Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
`12.7 Internet Inter-ORB Protocol (IIOP) . . . . . . . . . . . . . . . . . . . 12-27
`12.7.1 TCP/IP Connection Usage . . . . . . . . . . . . . . . . 12-27
`12.7.2 IIOP IOR Profiles . . . . . . . . . . . . . . . . . . . . . . . 12-27
`12.8 OMG IDL for the GIOP and IIOP Specifications. . . . . . . . . 12-29
`12.8.1 GIOP Module . . . . . . . . . . . . . . . . . . . . . . . . . . 12-29
`12.8.2 IIOP Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
`
`13. The DCE ESIOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1
`13.1 Goals of the DCE Common Inter-ORB Protocol . . . . . . . . . 13-1
`13.2 DCE Common Inter-ORB Protocol Overview . . . . . . . . . . . 13-1
`13.2.1 DCE-CIOP RPC . . . . . . . . . . . . . . . . . . . . . . . . 13-2
`13.2.2 DCE-CIOP Data Representation. . . . . . . . . . . . 13-3
`13.2.3 DCE-CIOP Messages . . . . . . . . . . . . . . . . . . . . 13-4
`13.2.4 Interoperable Object Reference (IOR) . . . . . . . 13-4
`13.3 DCE-CIOP Message Transport . . . . . . . . . . . . . . . . . . . . . . 13-5
`13.3.1 Pipe-based Interface . . . . . . . . . . . . . . . . . . . . . 13-5
`
`x
`
` CORBA V2.0 July 1995
`
`12
`
`
`
`13.3.2 Array-based Interface . . . . . . . . . . . . . . . . . . . . 13-7
`13.4 DCE-CIOP Message Formats. . . . . . . . . . . . . . . . . . . . . . . . 13-10
`13.4.1 DCE_CIOP Invoke Request Message. . . . . . . . 13-10
`13.4.2 DCE-CIOP Invoke Response Message . . . . . . . 13-11
`13.4.3 DCE-CIOP Locate Request Message . . . . . . . . 13-13
`13.4.4 DCE-CIOP Locate Response Message . . . . . . . 13-14
`13.5 DCE-CIOP Object References . . . . . . . . . . . . . . . . . . . . . . . 13-16
`13.5.1 DCE-CIOP String Binding Component . . . . . . 13-16
`13.5.2 DCE-CIOP Binding Name Component . . . . . . 13-17
`13.5.3 DCE-CIOP No Pipes Component . . . . . . . . . . . 13-18
`13.5.4 Object Key Component . . . . . . . . . . . . . . . . . . 13-19
`13.5.5 Endpoint ID Component . . . . . . . . . . . . . . . . . . 13-19
`13.5.6 Location Policy Component . . . . . . . . . . . . . . . 13-20
`13.6 DCE-CIOP Object Location. . . . . . . . . . . . . . . . . . . . . . . . . 13-21
`13.6.1 Location Mechanism Overview . . . . . . . . . . . . 13-21
`13.6.2 Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-22
`13.6.3 Basic Location Algorithm. . . . . . . . . . . . . . . . . 13-22
`13.6.4 Use of the Location Policy and the Endpoint ID
`13-23
`13.7 OMG IDL for the DCE CIOP Module . . . . . . . . . . . . . . . . . 13-24
`13.8 References for this Chapter . . . . . . . . . . . . . . . . . . . . . . . . . 13-26
`Appendix B
` OMG IDL Tags . . . . . . . . . . . . . . . . . . . . . . . . . .
` B-1
`
`14. C Language Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-1
`14.1 Requirements for a Language Mapping . . . . . . . . . . . . . . . . 14-1
`14.1.1 Basic Data Types . . . . . . . . . . . . . . . . . . . . . . . 14-2
`14.1.2 Constructed Data Types . . . . . . . . . . . . . . . . . . 14-2
`14.1.3 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2
`14.1.4 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2
`14.1.5 Invocation of Operations . . . . . . . . . . . . . . . . . 14-2
`14.1.6 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
`14.1.7 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
`14.1.8 ORB Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 14-4
`14.2 Scoped Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4
`14.3 Mapping for Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5
`14.4 Inheritance and Operation Names . . . . . . . . . . . . . . . . . . . . 14-6
`14.5 Mapping for Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-7
`14.6 Mapping for Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-8
`14.7 Mapping for Basic Data Types . . . . . . . . . . . . . . . . . . . . . . . 14-8
`
`CORBA V2.0 July 1995
`
`xi
`
`13
`
`
`
`14.8 Mapping Considerations for Constructed Types. . . . . . . . . . 14-9
`14.9 Mapping for Structure Types . . . . . . . . . . . . . . . . . . . . . . . . 14-10
`14.10 Mapping for Union Types . . . . . . . . . . . . . . . . . . . . . . . . . . 14-10
`14.11 Mapping for Sequence Types . . . . . . . . . . . . . . . . . . . . . . . . 14-11
`14.12 Mapping for Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-14
`14.13 Mapping for Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-15
`14.14 Mapping for Exception Types . . . . . . . . . . . . . . . . . . . . . . . 14-16
`14.15 Implicit Arguments to Operations . . . . . . . . . . . . . . . . . . . . 14-16
`14.16 Interpretation of Functions with Empty Argument Lists . . . 14-17
`14.17 Argument Passing Considerations . . . . . . . . . . . . . . . . . . . . 14-17
`14.18 Return Result Passing Considerations . . . . . . . . . . . . . . . . . 14-18
`14.19 Summary of Argument/Result Passing. . . . . . . . . . . . . . . . . 14-19
`14.20 Handling Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-21
`14.21 Method Routine Signatures . . . . . . . . . . . . . . . . . . . . . . . . . 14-23
`14.22 Include Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-24
`14.23 Pseudo-objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-24
`14.24 Mapping of the Dynamic Skeleton Interface to C . . . . . . . . 14-25
`14.24.1 Mapping of ServerRequest to C . . . . . . . . . . . . 14-25
`14.24.2 Mapping of BOA’s Dynamic Implementation Routine
`to C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-27
`14.25 BOA: Mapping for Object Implementations . . . . . . . . . . . . 14-27
`14.25.1 Operation-specific Details . . . . . . . . . . . . . . . . 14-27
`14.25.2 Method Signatures . . . . . . . . . . . . . . . . . . . . . . 14-27
`14.25.3 Binding Methods to Skeletons . . . . . . . . . . . . . 14-29
`14.25.4 BOA and ORB Operations . . . . . . . . . . . . . . . . 14-29
`14.26 ORB and OA/BOA Initialization Operations . . . . . . . . . . . . 14-30
`14.27 Operations for Obtaining Initial Object References . . . . . . . 14-32
`
`15. C++ Mapping Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1
`15.1 Key Design Decisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1
`15.1.1 Compliance. . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1
`15.1.2 C++ Implementation Requirements . . . . . . . . . 15-2
`15.1.3 C Data Layout Compatibility . . . . . . . . . . . . . . 15-2
`15.1.4 No Implementation Descriptions . . . . . . . . . . . 15-2
`15.2 Organization of the C++ Mapping . . . . . . . . . . . . . . . . . . . . 15-2
`
`16. Mapping of OMG IDL to C++. . . . . . . . . . . . . . . . . . . . . . . 16-1
`16.1 Preliminary Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1
`16.1.1 Scoped Names . . . . . . . . . . . . . . . . . . . . . . . . . 16-1
`
`xii
`
` CORBA V2.0