Previous | Table of Contents | Next |
Local interfaces are implemented by using CORBA::LocalObject, which derives from CORBA::Object and provides implementations
of Object pseudo operations and any other ORB specific support mechanisms that are appropriate for such objects. Object implementation
techniques are inherently language mapping specific. Therefore, the LocalObject type is not defined in IDL, but is specified
by each language mapping.
• Attempting to use a LocalObject to create a DII request shall result in a NO_IMPLEMENT system exception with standard minor code 4. Attempting to marshal or stringify a LocalObject shall result in a MARSHAL system exception with standard minor code 4. Narrowing and widening of references to LocalObjects must work as for regular object references.
• Local types cannot be marshaled and references to local objects cannot be converted to strings. Any attempt to marshal a local object, such as via an unconstrained base interface, as an Object, or as the contents of an any, or to pass a local object to ORB::object_to_string, shall result in a MARSHAL system exception with OMG minor code 4.
• The DII is not supported on local objects, nor are asynchronous invocation interfaces.
• Language mappings shall specify server side mechanisms, including base classes and/or skeletons if necessary, for implementing local objects, so that invocation overhead is minimized.
• The usage of client side language mappings for local types shall be identical to those of equivalent unconstrained types.
• Invocations on local objects are not ORB mediated. Specifically, parameter copy semantics are not honored, interceptors are not invoked, and the execution context of a local object does not have ORB service Current object contexts that are distinct from those of the caller. Implementations of local interfaces are responsible for providing the parameter copy semantics expected by clients.
• Local objects have no inherent identities beyond their implementations’ identities as programming objects. The lifecycle of the implementation is the same as the lifecycle of the reference.
• Instances of local objects defined as part of OMG specifications to be supplied by ORB products or object service products shall be exposed through the ORB::resolve_initial_references operation or through some other local object obtained from resolve_initial_references.
• The LocalObject type provides implementations of the following Object pseudooperations that raise the NO_IMPLEMENT system exception with standard minor code 8:
• get_interface • get_domain_managers • get_policy • get_client_policy • set_policy_overrides • get_policy_overrides • validate_connection • get_component • respository_id
• The LocalObject type provides implementations of the following pseudooperations:
• non_existent - always returns false. • hash - returns a hash value that is consistent for the lifetime of the object. • is_equivalent - returns true if the references refer to the same LocalObject implementation. • is_a - returns TRUE if the LocalObject derives from or is itself the type specified by the logical_type_id argument. • get_orb - The default behavior of this operation when invoked on a reference to a local object is to return the system exception NO_IMPLEMENT with standard minor code 8. Certain local objects that have close association with an ORB, like POAs, Current objects and certain portable interceptors related local objects override the default behavior and return a reference to the ORB that they are associated with. These are documented in the sections where these local objects are specified