Previous Table of Contents Next


21.3.9 Server-Side Interception Points


   21.3.9.1 receive_request_service_contexts

   At this interception point, Interceptors must get their service context information from the incoming request transfer it to PortableInterceptor::Current’s slots (see Section 21.4, “Portable Interceptor Current,? on page 21-33 for details on the relationship between receive_request_service_contexts and PortableInterceptor::Current).

   This interception point is called before the servant manager is called. Operation parameters are not yet available at this point. This interception point may or may not execute in the same thread as the target invocation.

   This interception point may raise a system exception. If it does, no other Interceptors’ receive_request_service_contexts operations are called. Those Interceptors on the Flow Stack are popped and their send_exception interception points are called.

   This interception point may also raise a ForwardRequest exception (see Section 21.3.15, “ForwardRequest Exception,? on page 21-33 for details on this exception). If an Interceptor raises this exception, no other Interceptors’ receive_request_service_contexts operations are called. Those Interceptors on the Flow Stack are popped and their send_other interception points are called.

   Compliant Interceptors shall properly follow completion_status semantics if they raise a system exception from this interception point. The completion_status shall be COMPLETED_NO.

   21.3.9.2 receive_request

   This interception point allows an Interceptor to query request information after all the information, including operation parameters, are available. This interception point shall execute in the same thread as the target invocation.

   In the DSI model, since the parameters are first available when the user code calls arguments, receive_request is called from within arguments. It is possible that arguments is not called in the DSI model. The target may call set_exception before calling arguments. The ORB shall guarantee that receive_request is called once, either through arguments or through set_exception. If it is called through set_exception, requesting the arguments will result in NO_RESOURCES being raised with a standard minor code of 1.

   This interception point may raise a system exception. If it does, no other Interceptors’ receive_request operations are called. Those Interceptors on the Flow Stack are popped and their send_exception interception points are called.

   This interception point may also raise a ForwardRequest exception (see Section 21.3.15, “ForwardRequest Exception,? on page 21-33 for details on this exception). If an Interceptor raises this exception, no other Interceptors’ receive_request operations are called. Those Interceptors on the Flow Stack are popped and their send_other interception points are called.

   Compliant Interceptors shall properly follow completion_status semantics if they raise a system exception from this interception point. The completion_status shall be COMPLETED_NO.

   21.3.9.3 send_reply

   This interception point allows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client. This interception point shall execute in the same thread as the target invocation.

   This interception point may raise a system exception. If it does, no other Interceptors’ send_reply operations are called. The remaining Interceptors in the Flow Stack shall have their send_exception interception point called.

   Compliant Interceptors shall properly follow completion_status semantics if they raise a system exception from this interception point. The completion_status shall be COMPLETED_YES.

   21.3.9.4 send_exception

   When an exception occurs, this interception point is called. It allows an Interceptor to query the exception information and modify the reply service context before the exception is raised to the client. This interception point shall execute in the same thread as the target invocation.

   This interception point may raise a system exception. This has the effect of changing the exception that successive Interceptors popped from the Flow Stack receive on their calls to send_exception. The exception raised to the client will be the last exception raised by an Interceptor, or the original exception if no Interceptor changes the exception.

   This interception point may also raise a ForwardRequest exception (see Section 21.3.15, “ForwardRequest Exception,? on page 21-33 for details on this exception). If an Interceptor raises this exception, no other Interceptors’ send_exception operations are called. The remaining Interceptors in the Flow Stack shall have their send_other interception points called.

   If the completion_status of the exception is not COMPLETED_NO, then it is inappropriate for this interception point to raise a ForwardRequest exception. The request’s at-most-once semantics would be lost.

   Compliant Interceptors shall properly follow completion_status semantics if they raise a system exception from this interception point. If the original exception is a system exception, the completion_status of the new exception shall be the same as on the original. If the original exception is a user exception, then the completion_status of the new exception shall be COMPLETED_YES.

   21.3.9.5 send_other

   This interception point allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception. A request could result in a retry (for example, a GIOP Reply with a LOCATION_FORWARD status was received). This interception point shall execute in the same thread as the target invocation.

   This interception point may raise a system exception. If it does, no other Interceptors’ send_other operations are called. The remaining Interceptors in the Flow Stack shall have their send_exception interception points called.

   This interception point may also raise a ForwardRequest exception (see Section 21.3.15, “ForwardRequest Exception,? on page 21-33 for details on this exception). If an Interceptor raises this exception, successive Interceptors’ send_other operations are called with the new information provided by the ForwardRequest exception.

   Compliant Interceptors shall properly follow completion_status semantics if they raise a system exception from this interception point. The completion_status shall be COMPLETED_NO.