Using the DISCONNECT( ) method terminates the connection with the specified AppServer or application service by sending a disconnect request to the connected AppServer or application service. When the AppServer or application service receives the disconnect request, the following occurs:
For a state-reset or state-aware AppServer — Control returns immediately to the client application, and any configured Disconnect procedure executes in the connected AppServer agent.
For a stateless AppServer — Any configured Disconnect procedure executes in an available AppServer agent, then control returns to the client application.
For a state-free application service — The client connection pool is released with no affect on any previously connected AppServers (no Disconnect procedures execute) and client control continues without interruption.
For any AppServer with pending asynchronous requests — All running or pending asynchronous requests are cancelled and the corresponding event procedure is called for each request. The CANCELLED attribute on the asynchronous request handle for all such cancelled requests is set to TRUE. For more information on asynchronous requests, see Managing asynchronous requests.