OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

2.1.13 Retrying a service function

If a problem (such as a deadlock) from which the system can be recovered by a retry occurs, you can retry the server UAP process without returning an error to the client UAP. This function is useful when you want to retry a service function in order to eliminate the necessity of reissuing a service request from the client UAP.

To retry a service function, invoke the function dc_rpc_service_retry() [CBLDCRPC('SVRETRY ')] from within the service function. Then, when the service function is made to return, it is restarted in the same process.

When a service function is retried, the settings made so far by the service function (response storage area and response length) are invalidated.

How many times to retry the service function should be assigned to the rpc_service_retry_count operand in the user service definition. If the number of retries exceeds the value assigned to this operand, the function dc_rpc_service_retry() returns with an error. Service functions that return after this event will not be retried, but will return the value set in the response area to the client UAP.

Before the function dc_rpc_service_retry() can be used, the following conditions must be fulfilled. Otherwise, the function returns with an error.

The figure below outlines the retry of a service function.

Figure 2-12 Outline of retry of service function

[Figure]