Try OpenEdge Now
skip to main content
Java Open Clients
Proxy Objects and Methods : Proxy methods : Common methods : Cancel all requests
 
Cancel all requests
The following method raises a STOP condition in the context of each outstanding request on the AppServer:
Syntax
public void _cancelAllRequests()
The _cancelAllRequests() method is most useful for multi-threaded clients.
This method throws a com.progress.open4gl.Open4GLException.
AppObjects, SubAppObjects, and ProcObjects have a _cancelAllRequests() method that a client can call to do the following:
*Raise the STOP condition on a request that was initiated by any object in the proxy and is running (normally during a long execution)
*Normal STOP condition processing applies, including the ability to trap the STOP condition
*Close any open ResultSets
When a client invokes a proxy method, the result is a request to the AppServer. The request itself can be in one of three states. Also, note that when the method completes and returns control to the application, the request still can be active if there is an open output ResultSet (that is, the connection is in a STREAMING state).
The three request states are:
*QUEUED — The connection is busy with a request from another thread. The current request is queued until the connection becomes available.
*RUNNING — The current request is being run on the connection, and the connection is in the RUNNING state.
*STREAMING — The current request is transmitting records over the connection, and the connection is in the STREAMING state.
The _cancelAllRequests() method operates on a request according to its state, as follows:
*QUEUED — Cancels the request and throws an exception if the STOP condition is not handled.
*RUNNING — Forwards a STOP request to the ABL interpreter on the AppServer, which handles it according to normal ABL STOP condition rules.
*STREAMING — Initiates the close of any currently open output ResultSets, but does not call the close() method. You must then execute the close() method on all affected output ResultSets, to complete the closure. For large ResultSets, this is more efficient than using the close() method alone. For more information on the close() method, see Passing Temp-tables as SQL ResultSet Parameters.
If there are no requests in the above states when you run _cancelAllRequests(), the method has no effect.