Previous | Table of Contents | Next |
LocateReply messages are sent from servers to clients in response to LocateRequest messages. In GIOP versions 1.0 and 1.1
the LocateReply message is only sent from the server to the client.
A LocateReply message has three elements, encoded in this order:
1. A GIOP message header
2. A LocateReplyHeader
3. The locate reply body
15.4.6.1 Locate Reply Header
The locate reply header is defined as follows:
module GIOP { // IDL extended for GIOP 1.2 and 1.3
#ifndef GIOP_1_2 // GIOP 1.0 and 1.1 enum LocateStatusType_1_0 {// Renamed from LocateStatusType
UNKNOWN_OBJECT, OBJECT_HERE, OBJECT_FORWARD
};
// GIOP 1.0
struct LocateReplyHeader_1_0 {// Renamed from LocateReplyHeader unsigned long request_id; LocateStatusType_1_0 locate_status;
};
// GIOP 1.1 typedef LocateReplyHeader_1_0 LocateReplyHeader_1_1; // same Header contents for 1.0 and 1.1
#else// GIOP 1.2, 1.3enum LocateStatusType_1_2 {
UNKNOWN_OBJECT,OBJECT_HERE,OBJECT_FORWARD,OBJECT_FORWARD_PERM, // new value for GIOP 1.2LOC_SYSTEM_EXCEPTION, // new value for GIOP 1.2LOC_NEEDS_ADDRESSING_MODE // new value for GIOP 1.2
};
struct LocateReplyHeader_1_2 { unsigned long request_id; LocateStatusType_1_2 locate_status; };
typedef LocateReplyHeader_1_2 LocateReplyHeader_1_3; #endif // GIOP_1_2 };
The members have the following definitions:
• request_id - is used to associate replies with requests. This member contains the same request_id value as the corresponding LocateRequest message.
• locate_status -the value of this member is used to determine whether a LocateReply body exists. Values are:
• UNKNOWN_OBJECT - the object specified in the corresponding LocateRequest message is unknown to the server; no body exists. • OBJECT_HERE -this server (the originator of the LocateReply message) can directly receive requests for the specified object; no body exists. • OBJECT_FORWARD and OBJECT_FORWARD_PERM -a LocateReply body exists. • LOC_SYSTEM_EXCEPTION - a LocateReply body exists. • LOC_NEEDS_ADDRESSING_MODE - a LocateReply body exists.
15.4.6.2 LocateReply Body
The body is empty, except for the following cases:
• If the LocateStatus value is OBJECT_FORWARD or OBJECT_FORWARD_PERM, the body contains an object reference (IOR) that may be used as the target for requests to the object specified in the LocateRequest message. The usage of OBJECT_FORWARD_PERM behaves like the usage of OBJECT_FORWARD, but when used by the server it also provides an indication to the client that it may replace the old IOR with the new IOR. When using OBJECT_FORWARD_PERM, both the old IOR and the new IOR are valid, but the new IOR is preferred for future use.
• If the LocateStatus value is LOC_SYSTEM_EXCEPTION, the body contains a marshaled GIOP::SystemExceptionReplyBody.
• If the LocateStatus value is LOC_NEEDS_ADDRESSING_MODE, then the body contains a GIOP::AddressingDisposition. The client ORB is responsible for re-sending the LocateRequest using the requested addressing mode.
Note – Usage of OBJECT_FORWARD_PERM is now deprecated, due to problems it causes with the semantics of the Object::hash operation.
OBJECT_FORWARD_PERM features could be removed from some future GIOP versions if solutions to these problems are not provided.
LocateReply bodies are marshaled immediately following the LocateReply header.
15.4.6.3 Handling ForwardRequest Exception from ServantLocator
If the ServantLocator in a POA raises a ForwardRequest exception the ORB shall send a LocateReply message to the client with
locate_status set to OBJECT_FORWARD, and with the body containing the object reference from the ForwardRequest exception’s
forward_reference field.