Previous Table of Contents Next


20.8.1 CORBA Chain Avoidance


   In CORBA, the chain avoidance information is carried as an IOP profile in an object reference that is part of a chain.

   module CosBridging

   {typedef sequence<octet> OpaqueRef;typedef sequence<octet> OpaqueData;typedef unsigned long ObjectSystemID;

   interface Resolver

   {

   OpaqueRef Resolve(in ObjectSystemID objSysID,in unsigned long chainDataFormat,in octet chainDataVersion,in OpaqueData chainData);

   };

   struct ResolvableRef

   {Resolver resolver;ObjectSystemID objSysID;unsigned long chainDataFormat;octet chainDataVersion;OpaqueData chainData;

   };

   typedef sequence<ResolvableRef> ResolvableChain;

   struct BridgingProfile{

   ResolvableChainchain;};};

   The content of the profile is defined as a single BridgingProfile structure. The ID for this profile will be allocated by the OMG. The profile structure contains a sequence of ResolvableRef structures, potentially one for each object system in the chain.

   The ResolvableRef structure contains a resolver CORBA object reference that can be called at runtime through its Resolve method to return an opaque (because it is not CORBA) object reference for the specified link in the chain. The link in the chain is identified by the object system ID, objSysID.

   Currently defined object system IDs are: 1 for CORBA, 2 for Automation, and 3 for COM. IDs in the range from 0 through 100000 are reserved for use by the OMG for future standardization.

   The ResolvableRef structure also contains information that can be used by the resolver as context to find the appropriate information to return. While this chain data is opaque, it is also tagged with a format identifier so that bridges that understand the format can directly interpret the contents of chainData instead of making a remote call to Resolve. The only currently defined format tag is 0, which is currently defined as “private.? That is, chainData tagged as private cannot be directly interpreted and must be passed to the resolver for interpretation. All other format tags are specific to each object system. Format tags in the range of 1 to 100000 are reserved for allocation by the OMG.

   The result of calling the Resolve method on a COM or Automation ResolvableRef is an NDR marshaled DCOM object reference with at least one strong reference.