Building Distributed
Applications
Using the Progress AppServer
Using the DISCONNECT( ) Method
Using the DISCONNECT( ) method terminates the connection with the specified AppServer by sending a disconnect request to the connected AppServer. When the AppServer receives the disconnect request:
- For a state-reset or state-aware AppServer—Control returns immediately to the client application, and any configured Disconnect procedure executes in the connected Application Server process.
- For a stateless AppServer—Any configured Disconnect procedure executes in an available Application Server process, then control returns to the client application.
- 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 the "Managing Asynchronous Requests" section.
When the disconnection request completes, you can send no more remote requests using the disconnected server handle.
The following example shows how a client application can disconnect from an AppServer instance:
When the DISCONNECT( ) method executes, the client application disconnects from the AppServer referenced by the hAppSrv handle.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |