Previous Table of Contents Next


21.3.7 Client-Side Interception Point Flow


   A ClientRequestInterceptor instance is registered with the ORB. The ORB logically maintains an ordered list of client-side Interceptors. The Interceptor list is traversed in order on the sending interception points and in reverse order on the receiving interception points.

   21.3.7.1 Client-side Flow Rules

    The client-side flow rules are derived from the general flow rules (see Section 21.3.2, “General Flow Rules,? on page 21-7):

   21.3.7.2 Additional Client-side Details

   If, during request processing, a request is canceled because of an ORB shutdown, receive_exception is called with the system exception BAD_INV_ORDER with a minor code of 4 (ORB has shutdown).

   If a request is canceled for any other reason (for example, a GIOP cancel message is sent by the ORB), receive_exception is called with the system exception TRANSIENT with a standard minor code of 2.

   On oneway requests, returning control to the client may occur immediately or it may return after the target has performed the operation, or somewhere in-between depending on the SyncScope (see Section 21.3.12.9, “sync_scope,? on page 21-23). Regardless of the SyncScope, if there is no exception, receive_other is called before control is returned to the client.

   Asynchronous requests are simply two separate requests. The first request receives no reply. The second receives a normal reply. So the normal (no exceptions) flow is: first request -send_request followed by receive_other; second request send_request followed by receive_reply.

   21.3.7.3 Client-side Flow Examples

   Given the client-side flow rules, here are some concrete examples:

   For the following exception scenarios, assume we have Interceptors A, B, and C. On the send interception points they are called in the order A, B, C; on the receive interception points they are called in the order C, B, A.

   Scenario

   An exception arrives from the server:

   They are all: send_request followed by receive_exception - a start point is followed by an end point.

   Scenario

   B.send_request raises an exception:

   In this scenario you can see that the flow for each Interceptor follows the rules:

   Scenario

   A reply returns successfully from the server, but B.receive_reply raises an exception:

   In this scenario you can see that the flow for each Interceptor follows the rules:

   The scenario for B raising an exception at receive_other is similar to the scenario where B raises an exception at receive_reply.

   Scenario

   An exception X is returned by the server, but B.receive_exception changes the exception to Y:

   In this scenario, the flow for all Interceptors is send_request followed by receive_exception - a start point followed by an end point - Interceptor A is handed exception Y while the B and C are handed exception X.