Previous Table of Contents Next


16.5.6 Location Policy Component


   An optional location policy component can be included in IOR profiles to specify when a DCE-CIOP client ORB should perform a locate RPC before attempting to perform an invoke RPC. No more than one location policy component should be included in a profile, and it can be used by other protocols that have location algorithms similar to DCE-CIOP.

   module IOP { // IDL const ComponentId TAG_LOCATION_POLICY = 12;

   // IDL does not support octet constants #define LOCATE_NEVER = 0 #define LOCATE_OBJECT = 1 #define LOCATE_OPERATION = 2 #define LOCATE_ALWAYS = 3

   };

   A TaggedComponent structure for a location policy component is built by setting the tag member to TAG_LOCATION_POLICY and setting the component_data member to a sequence containing a single octet, whose value is LOCATE_NEVER, LOCATE_OBJECT, LOCATE_OPERATION, or LOCATE_ALWAYS.

   If a location policy component is not present in a profile, the client should assume a location policy of LOCATE_OBJECT.

   A client should interpret the location policy as follows:

   The location policy is a hint that enables a client to avoid unnecessary locate RPCs and to avoid invoke RPCs that return INVOKE_LOCATION_FORWARD status. It is not needed to provide correct semantics, and can be ignored. Even when this hint is utilized, an invoke RPC might result in an INVOKE_LOCATION_FORWARD response. See Section 16.6, “DCE-CIOP Object Location,? on page 16-21 for more details.

   A client does not need to implement all location policies to make use of this hint. A location policy with a higher value can be substituted for one with a lower value. For instance, a client might treat LOCATE_OPERATION as LOCATE_ALWAYS to avoid having to keep track of binding information for each operation on an object.

   When combined with an endpoint ID component, a location policy of LOCATE_OBJECT indicates that the client should perform a locate RPC for the first object with a particular endpoint ID, and then just perform an invoke RPC for other objects with the same endpoint ID. When a location policy of LOCATE_NEVER is combined with an endpoint ID component, only invoke RPCs need be performed. The LOCATE_ALWAYS and LOCATE_OPERATION policies should not be combined with an endpoint ID component in a profile.