The classic AppServer provides ABL session Connect and Disconnect event procedures that enable 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 classic AppServer. The properties that control these event procedures use the prefix srvr, which reflects their identification with server (agent) processes. Each classic 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 eliminated inconsistent execution produced by connection models that no longer exist (HTTP is the only one).

Naming

The classic 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 procedure is important when you migrate a state-reset application to PAS for OpenEdge. Because there is no "reset" of session-managed sessions in PAS for OpenEdge, you must 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. The Procedure name column lists the property in openedge.properties where you set the name of the specified procedure:

Table 1. Comparing Connect and Disconnect procedures between AppServer and PAS for OpenEdge
Procedure name AppServer persistence PAS for OpenEdge persistence Runs at Parameters
sessionConnectProc Persistent Persistent OpenEdge client connection No changes
sessionDisconnProc Non-persistent Non-persistent OpenEdge client disconnect and session shutdown None

Notes:

  • The classic AppServer's srvrConnectProc persistent procedure is not deleted unless the ABL application code explicitly deletes it. PAS for OpenEdge automatically deletes the sessionConnectProc procedure after the client connection is closed.
  • The classic stateless AppServer srvrConnectProc and srvrDisconnectProc procedures execute in different ABL sessions. Because PAS for OpenEdge creates a bound, session-managed client connection to the same ABL session, the sessionConnectProc and sessionDisconnectProc 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 affects the automatic "reset" of the ABL session after client disconnect. To enable PAS for OpenEdge to emulate this classic state-reset behavior, with no operating modes, execute an ABL QUIT statement at the end of the sessionDisconnProc after setting SESSION:CLIENT-SERVER-BOUND-REQUEST to FALSE.
  • A classic state-reset or state-aware AppServer affects the automatic client-bound state before the srvrConnectProc procedure is executed. To allow PAS for OpenEdge to emulate this behavior, with no operating modes, set the ABL SESSION:CLIENT-SERVER-BOUND-REQUEST attribute to TRUE at the beginning of the sessionConnectProc procedure to produce the same behavior. (See 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.

Note: If you simulate state-reset behavior using a QUIT statement in the disconnect procedure, be aware that this may generate (8027) warnings in the logs. This is resolved in OpenEdge 12.8.7 and 12.2.18. For more information, see Log file growth due to QUIT in disconnect procedure.