The Object Model Overview Object Semantics Objects Requests Object Creation and Destruction Types Interfaces Value Types Abstract Interfaces Operations Attributes Object Implementation The Execution Model: Performing Services The Construction Model CORBA Overview Structure of an Object Request Broker Object Request Broker Clients Object Implementations Object References OMG Interface Definition Language Mapping of OMG IDL to Programming Languages Client Stubs Dynamic Invocation Interface Implementation Skeleton Dynamic Skeleton Interface Object Adapters ORB Interface Interface Repository Implementation Repository Example ORBs Client- and Implementation-resident ORB Server-based ORB System-based ORB Library-based ORB Structure of a Client Structure of an Object Implementation Structure of an Object Adapter CORBA Required Object Adapter Portable Object Adapter The Integration of Foreign Object Systems OMG IDL Syntax and Semantics Overview Lexical Conventions Tokens Comments Identifiers Keywords Literals Preprocessing OMG IDL Grammar OMG IDL Specification Import Declaration Module Declaration Interface Declaration Interface Header Interface Inheritance Specification Interface Body Forward Declaration Interface Inheritance Abstract Interface Local Interface Value Declaration Regular Value Type Boxed Value Type Abstract Value Type Value Forward Declaration Valuetype Inheritance Constant Declaration Syntax Semantics Type Declaration Basic Types Constructed Types Template Types Complex Declarator Native Types Deprecated Anonymous Types Exception Declaration Operation Declaration Operation Attribute Parameter Declarations Raises Expressions Context Expressions Attribute Declaration Repository Identity Related Declarations Repository Identity Declaration Repository Identifier Prefix Declaration Event Declaration Regular Event Type Abstract Event Type Event Forward Declaration Eventtype Inheritance Component Declaration Component Component Header Component Body Event Sources—publishers and emitters Event Sinks Basic and Extended Components Home Declaration Home Home Header Home Body CORBA Module Names and Scoping Qualified Names Scoping Rules and Name Resolution Special Scoping Rules for Type Names ORB Interface Overview The ORB Operations ORB Identity Converting Object References to Strings Getting Service Information Thread-Related Operations Object Reference Operations Determining the Object Interface Duplicating and Releasing Copies of Object References Nil Object References Equivalence Checking Operation Probing for Object Non-Existence Object Reference Identity Type Coercion Considerations Getting Policy Associated with the Object Overriding Associated Policies on an Object Reference Validating Connection Getting the Domain Managers Associated with the Object Getting Component Associated with the Object Getting the ORB LocalObject Operations ValueBase Operations ORB and OA Initialization and Initial References ORB Initialization Obtaining Initial Object References Context Object Current Object Policy Object Definition of Policy Object Creation of Policy Objects Usages of Policy Objects Policy Associated with the Execution Environment Specification of New Policy Objects Standard Policies Management of Policies Client Side Policy Management Server Side Policy Management Policy Management Interfaces Management of Policy Domains Basic Concepts Domain Management Operations TypeCodes The TypeCode Interface TypeCode Constants Creating TypeCodes Value Type Semantics Overview Architecture Abstract Values Operations Value Type vs. Interfaces Parameter Passing Substitutability Issues Widening/Narrowing Value Base Type Life Cycle issues Security Considerations Standard Value Box Definitions Language Mappings General Requirements Language Specific Marshaling Language Specific Value Factory Requirements Value Method Implementation Custom Marshaling Implementation of Custom Marshaling Marshaling Streams Access to the Sending Context Run Time Abstract Interface Semantics Overview Semantics of Abstract Interfaces Usage Guidelines Example Security Considerations Passing Values to Trusted Domains Dynamic Invocation Interface Overview Common Data Structures Memory Usage Return Status and Exceptions Request Operations create_request add_arg invoke delete send poll_response get_response sendp prepare sendc ORB Operations send_multiple_requests get_next_response and poll_next_response Polling List Operations create_list add_item free free_memory get_count create_operation_list Dynamic Skeleton Interface Introduction Overview ServerRequestPseudo-Object ExplicitRequest State: ServerRequestPseudo-Object DSI: Language Mapping ServerRequest’s Handling of Operation Parameters Registering Dynamic Implementation Routines Dynamic Management of Any Values Overview DynAny AP Usage in C++ Language The Interface Repository Overview Scope of an Interface Repository Implementation Dependencies Managing Interface Repositories Basics Names and Identifiers Types and TypeCodes Interface Repository Objects Structure and Navigation of the Interface Repository Interface Repository Interfaces Supporting Type Definitions IRObject Contained Container IDLType Repository Read Interface ModuleDef ConstantDef TypedefDef StructDef UnionDef EnumDef AliasDef PrimitiveDef StringDef WstringDef FixedDef SequenceDef ArrayDef ExceptionDef AttributeDef OperationDef AbstractInterfaceDef LocalInterfaceDef ValueMemberDef ValueDef ValueBoxDef NativeDef RepositoryId OMG IDL Format RMI Hashed Format DCE UUID Format LOCAL Format Pragma Directives for RepositoryId For More Information RepositoryIDs for OMG-Specified Types OMG IDL for Interface Repository The Portable Object Adapter Overvie Abstract Model Description Model Components Model Architecture POA Creation Reference Creation Object Activation States Request Processing Implicit Activation Dynamic Skeleton Interface Interfaces The Servant IDL Type POAManager Interface AdapterActivator Interface ServantManager Interface ServantActivator Interface ServantLocator Interface POA Policy Objects POA Interface IDL for PortableServer Module UML Description of PortableServer Usage Scenarios Getting the Root POA Creating a POA Explicit Activation with POA-assigned Object Ids Explicit Activation with User-assigned Object Ids Creating References before Activation Servant Manager Definition and Creation Object Activation on Demand Persistent Objects with POA-assigned Ids Multiple Object Ids Mapping to a Single Servant One Servant for All Objects Interoperability Overview Elements of Interoperability ORB Interoperability Architecture Inter-ORB Bridge Support General Inter-ORB Protocol Internet Inter-ORB Protocol Environment-Specific Inter-ORB Protocols Relationship to Previous Versions of CORBA Examples of Interoperability Solutions Example 1 Example 2 Example 3 Interoperability Compliance Motivating Factors ORB Implementation Diversity ORB Boundaries ORBs Vary in Scope, Distance, and Lifetime Interoperability Design Goals Non-Goals ORB Interoperability Architecture Overview Domains Bridging Domains ORBs and ORB Services The Nature of ORB Services ORB Services and Object Requests Selection of ORB Services Domains Definition of a Domain Mapping Between Domains: Bridging Interoperability Between ORBs ORB Services and Domains ORBs and Domains Interoperability Approaches Policy-Mediated Bridging Configurations of Bridges in Networks Object Addressing Domain-relative Object Referencing Handling of Referencing Between Domains An Information Model for Object References What Information Do Bridges Need? Interoperable Object References: IORs IOR Profiles Standard IOR Profiles IOR Components Standard IOR Components Profile and Component Composition in IORs IOR Creation and Scope Stringified Object References Service Context Standard Service Contexts Service Context Processing Rules Coder/Decoder Interfaces Codec Interface Codec Factory Feature Support and GIOP Versions Code Set Conversion Character Processing Terminology Code Set Conversion Framework Mapping to Generic Character Environments Example of Generic Environment Mapping Relevant OSFM Registry Interfaces Building Inter-ORB Bridges Introduction In-Line and Request-Level Bridging In-line Bridging Request-level Bridging Collocated ORBs Proxy Creation and Management Interface-specific Bridges and Generic Bridges Building Generic Request-Level Bridges Bridging Non-Referencing Domains Bootstrapping Bridges General Inter-ORB Protocol Goals of the General Inter-ORB Protocol GIOP Overview Common Data Representation GIOP Message Overview GIOP Message Transfer CDR Transfer Syntax Primitive Types OMG IDL Constructed Types Encapsulation Value Types Pseudo-Object Types Object References Abstract Interfaces GIOP Message Formats GIOP Message Header Request Message Reply Message CancelRequest Message LocateRequest Message LocateReply Message CloseConnection Message MessageError Message Fragment Message Connection Management Message Ordering Object Location Internet Inter-ORB Protocol TCP/IP Connection Usage IIOP IOR Profiles IIOP IOR Profile Components Bi-Directional GIOP Bi-Directional IIOP Bi-directional GIOP policy OMG IDL GIOP Module IIOP Module BiDirPolicy Module The DCE ESIOP Goals of the DCE Common Inter-ORB Protocol DCE Common Inter-ORB Protocol Overview DCE-CIOP RPC DCE-CIOP Data Representation DCE-CIOP Messages Interoperable Object Reference DCE-CIOP Message Transport Pipe-based Interface Array-based Interface DCE-CIOP Message Formats DCE_CIOP Invoke Request Message DCE-CIOP Invoke Response Message DCE-CIOP Locate Request Message DCE-CIOP Locate Response Message DCE-CIOP Object References DCE-CIOP String Binding Component DCE-CIOP Binding Name Component DCE-CIOP No Pipes Component Complete Object Key Component Endpoint ID Position Component Location Policy Component DCE-CIOP Object Location Location Mechanism Overview Activation Basic Location Algorithm Use of the Location Policy and the Endpoint ID OMG IDL for the DCE CIOP Module References for this Chapter Interworking Architecture Purpose of the Interworking Architecture Comparing COM Objects to CORBA Objects Interworking Object Model Relationship to CORBA Object Model Relationship to the OLE/COM Model Basic Description of the Interworking Model Interworking Mapping Issues Interface Mapping CORBA/COM CORBA/Automation COM/CORBA Automation/CORBA Interface Composition Mappings CORBA/COM Detailed Mapping Rules Example of Applying Ordering Rules Mapping Interface Identity Object Identity, Binding, and Life Cycle Object Identity Issues Interworking Interfaces SimpleFactory Interface IMonikerProvider Interface and Moniker Use ICORBAFactory Interface IForeignObject Interface ICORBAObject Interface ICORBAObject2 Naming Conventions for View Components Distribution Bridge Locality Distribution Architecture Compliance to COM/CORBA Interworking Products Subject to Compliance Compliance Points Mapping: COM and CORBA Data Type Mapping CORBA to COM Data Type Mapping Mapping for Basic Data Types Mapping for Constants Mapping for Enumerators Mapping for String Types Mapping for Struct Types Mapping for Union Types Mapping for Sequence Types Mapping for Array Types Mapping for the any Type Interface Mapping Inheritance Mapping Mapping for Pseudo-Objects Interface Repository Mapping COM to CORBA Data Type Mapping Mapping for Basic Data Types Mapping for Constants Mapping for Enumerators Mapping for String Types Mapping for Structure Types Mapping for Union Types Mapping for Array Types Mapping for VARIANT Mapping for Pointers Interface Mapping Mapping for Read-Only Attributes Mapping for Read-Write Attributes Mapping: Automation and CORBA Mapping CORBA Objects to Automation Architectural Overview Main Features of the Mapping Mapping for Interfaces Mapping for Attributes and Operations Mapping for OMG IDL Single Inheritance Mapping of OMG IDL Multiple Inheritance Mapping for Basic Data Types Basic Automation Types Special Cases of Basic Data Type Mapping Mapping for Strings IDL to ODL Mapping A Complete IDL to ODL Mapping for the Basic Data Types Mapping for Object References Type Mapping Object Reference Parameters and IForeignObject Mapping for Enumerated Types Mapping for Arrays and Sequences Mapping for CORBA Complex Types Mapping for Structure Types Mapping for Union Types Mapping for TypeCodes Mapping for anys Mapping for Constants Getting Initial CORBA Object References Creating Initial in Parameters for Complex Types Mapping CORBA Exceptions to Automation Exceptions Conventions for Naming Components of the Automation View Naming Conventions for Pseudo-Structs, Pseudo-Unions, and Pseudo-Exceptions Automation View Interface as a Dispatch Interface Aggregation of Automation Views DII and DSI Mapping Automation Objects as CORBA Objects Main Features of the Mapping Getting Initial Object References Mapping for Interfaces Mapping for Inheritance Mapping for ODL Properties and Methods Mapping for Automation Basic Data Types Conversion Errors Special Cases of Data Type Conversion A Complete OMG IDL to ODL Mapping for the Basic Data Types Mapping for Enumerated Types Mapping for SafeArrays Mapping for Typedefs Mapping for VARIANTs Mapping Automation Exceptions to CORBA Older Automation Controllers Mapping for OMG IDL Arrays and Sequences to Collections Example Mappings Mapping the OMG Naming Service to Automation Mapping a COM Service to OMG IDL Mapping an OMG Object Service to Automation Interoperability with non-CORBA Systems Introduction COM/CORBA Part A Conformance Issues Performance Issues Scalability Issues CORBA Clients for DCOM Servers Locality of the Bridge Extent Definition Marshaling Constraints Marshaling Key Extent Format Request/Reply Extent Semantics Consistenc IValueObject ISynchronize and DISynchronize DCOM Value Objects Passing Automation Compound Types as DCOM Value Objects Passing CORBA-Defined Pseudo-Objects as DCOM Value Objects IForeignObject DIForeignComplexType DIForeignException DISystemException DICORBAUserException DICORBAStruct DICORBAUnion DICORBATypeCode and ICORBATypeCode DICORBAAny ICORBAAny User Exceptions In COM Chain Avoidance CORBA Chain Avoidance COM Chain Avoidance Chain Bypass CORBA Chain Bypass COM Chain Bypass Thread Identification Portable Interceptors Introduction Object Creation Client Sends Request Server Receives Request Server Sends Reply Client Receives Reply Interceptor Interface Request Interceptors Design Principles General Flow Rules The Flow Stack Visual Model The Request Interceptor Points Client-Side Interceptor Client-Side Interception Points Client-Side Interception Point Flow Server-Side Interceptor Server-Side Interception Points Server-Side Interception Point Flow Request Information RequestInfo Interface ClientRequestInfo Interface ServerRequestInfo Interface ForwardRequest Exception Portable Interceptor Current Overview Obtaining the Portable Interceptor Current Portable Interceptor Current Interface Use of Portable Interceptor Current IOR Interceptor Overview IORInterceptor Interface IORInfo Interface PolicyFactory PolicyFactory Interface Registering Interceptors ORBInitializer Interface ORBInitInfo Interface register_orb_initializer Operation Notes about Registering Interceptors Dynamic Initial References register_initial_reference Module Dynamic NVList PIDL Represented by ParameterList IDL ContextList PIDL Represented by ContextList IDL ExceptionList PIDL Represented by ExceptionList IDL Context PIDL Represented by RequestContext IDL Consolidated IDL Dynamic Portions of IOP Relevant to Portable Interceptor PortableInterceptor CORBA Messaging Section I - Introduction Messaging Quality of Service Rebind Support Synchronization Scope Request and Reply Priority Request and Reply Timeout Routing Queue Ordering Propagation of Messaging QoS Structures Messaging QoS Profile Component Messaging QoS Service Context Section II - Introduction Running Example Async Operation Mapping Callback Model Signatures Polling Model Signatures Exception Delivery in the Callback Model Messaging::ExceptionHolder valuetype Type-Specific ReplyHandler Mapping ReplyHandler Operations for NO_EXCEPTION Replies ReplyHandler Operations for Exceptional Replies Example Generic Poller Value operation_target operation_name associated_handler is_from_poller Type-Specific Poller Mapping Basic Type-Specific Poller Persistent Type-Specific Poller Example Example Programmer Usage Example Programmer Usage Client-Side C++ Example for the Asynchronous Method Signatures Client-Side C++ Example of the Callback Model Client-Side C++ Example of the Polling Model Server Side Section III - Introduction Routing Object References Message Routing Structures Interfaces Routing Protocol Router Administration Constants Exceptions Valuetypes Interfaces CORBA Messaging IDL Messaging Module MessageRouting Module Fault TolerantCORBA Fault Tolerant CORBA Fault Tolerance for Diverse Applications Objectives Basic Concepts Architectural Overview Requirements Limitations Basic Fault Tolerance Mechanisms Overview Interoperable Object Group References Interoperable Object Group Reference Operations Modes of Profile Addressing Accessing Server Object Groups Extensions to CORBA Failover Semantics Most Recent Object Group Reference Transparent Reinvocation Transport Heartbeats Replication Management Overview Fault Tolerance Properties FaultMonitoringIntervalAndTimeout CheckpointInterval Common Types Replication Manager PropertyManager ObjectGroupManager GenericFactory Obtaining the Reference for the Replication Manager Use Cases Fault Management Overview Connecting Fault Detectors to Applications Pull-Based Monitoring Fault Event Types Fault Notifier Use Cases Logging & Recovery Management Overview Logging Mechanism Recovery Mechanism Checkpointable and Updateable Interfaces Use Case Consolidated IDL OMG IDL Secure Interoperability Overview Assumptions Protocol Message Definitions The Security Attribute Service Context Element SAS context_data Message Body Types Authorization Token Format Client Authentication Token Format Identity Token Format Principal Names and Distinguished Names Security Attribute Service Protocol Compound Mechanisms Session Semantics TSS State Machine CSS State Machine ContextError Values and Exceptions Transport Security Mechanisms Transport Layer Interoperability Transport Mechanism Configuration Interoperable Object References Target Security Configuration Client-side Mechanism Selection Client-Side Requirements and Location Binding Conformance Levels Conformance Level 0 Conformance Level 1 Conformance Level 2 Stateful Conformance Sample Message Flows and Scenarios Confidentiality, Trust in Server, and Trust in Client Established in the Connection Confidentiality and Trust in Server Established in the Connection - Stateless Trust in Client Established in Service Context Confidentiality, Trust in Server, and Trust in Client Established in the Connection - Stateless Trust Association Established in Service Context Confidentiality, Trust in Server, and Trust in Client Established in the Connection - Stateless Forward Trust Association Established in Service Context References for this Chapter IDL Module GSSUP - Username/Password GSSAPI Token Formats Module CSI - Common Secure Interoperability Module CSIIOP - CSIv2 IOR Component Tag Definitions