Previous | Table of Contents | Next |
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:
• LOCATE_NEVER - Perform only the invoke RPC. No locate RPC is necessary.
• LOCATE_OBJECT - Perform a locate RPC once per object. The operation member of the locate request message will be ignored.
• LOCATE_OPERATION - Perform a separate locate RPC for each distinct operation on the object. This policy can be used when different methods of an object are located in different processes.
• LOCATE_ALWAYS - Perform a separate locate RPC for each invocation on the object. This policy can be used to support server-per-method activation.
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.