Programming Guide



service_cancel

Cancels an outstanding service request

Synopsis

service_cancel [services]

Arguments

services
Specifies which services to cancel:

CALL callid
Cancel the specific service request identified by callid.

ALL [(callid...)]
An unqualified ALL cancels all outstanding service requests; if followed by a list of service call identifiers (callid), ALL cancels the specified service requests. Enclose the list of call identifiers with parentheses.

Environment

JetNet, Oracle Tuxedo

Scope

Client, Server

Description

The service_cancel command cancels the specified service requests. An unqualified service_cancel cancels the most recent asynchronous request. You can cancel one or more requests with the CALL and ALL options. For example, this statement cancels the service request identified by the Panther variable call_id:

service_cancel CALL call_id

This statement cancels all outstanding service requests:

service_cancel ALL

You can cancel both synchronous and asynchronous service calls. Canceling a call does not stop it from running; however, it does stop the reply. If the canceled service is part of a transaction under Oracle Tuxedo, the cancellation should be accompanied by a rollback to ensure the integrity of an XA resource.

service_cancel sets the tp_return property to the number of service calls canceled.

Exceptions

service_cancel can generate the following exceptions:

Exception Severity Cause
TP_ALREADY_CANCELED
TP_WARNING

The request has already been canceled.

TP_EXPLICIT_CANCEL
TP_INFORMATION

Each request is canceled (informational only).

TP_INVALID_CALL
TP_COMMAND

Service call is unidentifiable.

TP_INVALID_CONNECTION
TP_COMMAND

No connection to the middleware exists.

TP_MONITOR_ERROR
TP_COMMAND

An error is reported from the middleware.

TP_NO_OUTSTANDING_CALLS
TP_INFORMATION

No service calls are outstanding; that is, a specified service call has already completed.

Note: A call is considered outstanding as soon as its associated pre_request event has been raised, and is considered complete as soon as its associated post_request event has been generated. After each request has terminated, a post_request event is generated. For more information, refer to "Pre_request and Post_request Events" in JetNet/Oracle Tuxedo Guide.

See Also

receive, service_call, service_forward, service_return