Try OpenEdge Now
skip to main content
Developing AppServer Applications
Programming the AppServer : Using AppServer configuration procedures : Connect and Disconnect procedures : Disconnect procedure
 
Disconnect procedure
A Disconnect procedure executes in whatever AppServer agent handles a client disconnection request, but before the connection is terminated. You can use the AppServer Disconnect procedure to specify logic that you want executed at this time. For example, you might want to use it to disconnect from a client-specific database or from other AppServers that were connected on behalf of the client.
You can specify the name of an AppServer Disconnect procedure using the OpenEdge Explorer or OpenEdge Management or by setting the srvrDisconnProc property in the AppServer properties file (ubroker.properties). This procedure takes no parameters.
For an AppServer running in state-reset or state-aware operating mode, the Disconnect procedure runs after the AppServer returns the response to the client disconnection request to the client application. For a stateless AppServer, the procedure runs just before the AppServer returns this disconnection response, where it is typically used to delete connection-specific context. Any raised conditions that you do not handle in this procedure are ignored by OpenEdge.