BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Programming   |   Topic List   |   Previous   |   Next   |   Contents

   Programming a BEA Tuxedo Application Using C

General Communication Call Errors

General communication call errors can occur during any communication calls, regardless of whether those calls are synchronous or asynchronous. Any of the following errors may be returned in tperrno(5): TPESVCFAIL, TPESVCERR, TPEBLOCK, or TPGOTSIG.

TPESVCFAIL and TPESVCERR Errors

If the reply portion of a communication fails as a result of a call to tpcall() or tpgetrply(), the system returns TPESVCERR or TPSEVCFAIL to tperrno(5). The system determines the error by the arguments that are passed to tpreturn() and the processing that is performed by this function.

If tpreturn() encounters an error in processing or handling arguments, the system returns an error to the original requester and sets tperrno(5) to TPESVCERR. The receiver determines that an error has occurred by checking the value of tperrno(). The system does not send the data from the tpreturn() function, and if the failure occurred on tpgetrply(), it renders the call descriptor invalid.

If tpreturn() does not encounter the TPESVCERR error, then the value returned in rval determines the success or failure of the call. If the application specifies TPFAIL in the rval parameter, the system returns TPESVCFAIL in tperrno(5) and sends the data message to the caller. If rval is set to TPSUCCESS, the system returns successfully to the caller, tperrno() is not set, and the caller receives the data.

TPEBLOCK and TPGOTSIG Errors

The TPEBLOCK and TPGOTSIG error codes may be returned at the request or the reply end of a message and, as a result, can be returned for all communication calls.

The system returns TPEBLOCK when a blocking condition exists and the process sending a request (synchronously or asynchronously) indicates, by setting its flags parameter to TPPNOBLOCK, that it does not want to wait on a blocking condition. A blocking condition can exist when a request is being sent if, for example, all the system queues are full.

When tpcall() indicates a no blocking condition, only the sending part of the communication is affected. If a call successfully sends a request, the system does not return TPEBLOCK, regardless of any blocking situation that may exist while the call waits for the reply.

The system returns TPEBLOCK for tpgetrply() when a call is made with flags set to TPNOBLOCK and a blocking condition is encountered while tpgetrply() is awaiting the reply. This may occur, for example, if a message is not currently available.

The TPGOTSIG error indicates an interruption of a system call by a signal; this situation is not actually an error condition. If the flags parameter for the communication functions is set to TPSIGRSTRT, the calls do not fail and the system does not return the TPGOTSIG error code in tperrno(5).