Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Migrating AppServer and WebSpeed Applications : ABL application code migration : Comparing event procedures between the AppServer and PAS for OpenEdge : Connect and Disconnect procedures
 
Connect and Disconnect procedures
The classic AppServer provides ABL session Connect and Disconnect event procedures that allow you to manage the initialization and cleanup of a session-managed server session. Because of the different connection models for the classic AppServer, the execution and scope of these procedures vary on the AppServer. The properties that control these event procedures use the prefix srvr, which reflects their identification with server (agent) processes. Each AppServer agent is a single ABL session that runs as a single OS process (AVM).
In PAS for OpenEdge, these Connect and Disconnect procedure properties are renamed with the session prefix to better reflect their association with ABL sessions rather than server processes. In addition, PAS for OpenEdge has eliminated inconsistent execution produced by connection models that no longer exist (HTTP being the only one).

Naming

The classic OpenEdge AppServer properties in ubroker.properties are srvrConnectProc and srvrDisconnProc.
The corresponding PAS for OpenEdge properties in openedge.properties are sessionConnectProc and sessionDisconnProc.
In both servers, these properties are implemented as parameter-name=value pairs.
This sessionDisconnProc-specified procedure is important when migrating a state-reset application to PAS for OpenEdge. Since there is no "reset" of session-managed sessions in PAS for OpenEdge, you need to write additional code to reset the session and remove any context information before the next client uses the session.

Execution

The following table compares the execution of these procedures on the classic AppServer and PAS for OpenEdge, where the Procedure name column lists the property in openedge.properties where you set the name of the specified procedure:
Table 5. Comparing Connect and Disconnect procedures between AppServer and PAS for OE
Procedure name
AppServer persistence
PAS for OpenEdge persistence
Runs at
Parameters
sessionConnectProc
Persistent
Persistent
OE client connection
No changes
sessionDisconnProc
Non-persistent
Non-persistent
OE client disconnect and session shutdown
None

Notes:

*The classic AppServer's srvrConnectProc-specified persistent procedure is not deleted unless the ABL application code explicitly deletes it. PAS for OpenEdge automatically deletes the sessionConnectProc-specified procedure after the client connection is closed.
*The classic stateless AppServer srvrConnectProc and srvrDisconnectProc-specified procedures execute in different ABL sessions. Because PAS for OpenEdge creates bound session-managed client connection to the same ABL session, the sessionConnectProc and sessionDisconnectProc-specified event procedures execute in the same ABL session as all of the client's requests (the same way the classic state-reset and state-aware AppServer configuration procedures work).
*The classic state-reset AppServer effects an automatic "reset" of the ABL session after client disconnect. To allow PAS for OpenEdge to emulate this classic state-reset behavior, with no operating modes, requires executing an ABL QUIT statement at the end of the sessionDisconnProc and after setting SESSION:CLIENT-SERVER-BOUND-REQUEST to FALSE.
*A classic state-reset or state-aware AppServer effects an automatic client-bound state before the srvrConnectProc-specified procedure is executed. To allow PAS for OpenEdge to emulate this behavior, with no operating modes, requires the ABL SESSION:CLIENT-SERVER-BOUND-REQUEST attribute set to TRUE at the beginning of the sessionConnectProc-specified procedure to produce the same behavior. (See also information on the sessionActivateProc and sessionDeactivateProc properties in Activate and Deactivate procedures.)
In all other respects the ABL session's Connect and Disconnect event procedures are the same for classic AppServer and PAS for OpenEdge.