Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming the Progress Application Server for OpenEdge : Using PAS for OpenEdge event procedures : Connect and Disconnect procedures : Usage requirements
 
Usage requirements
Any Connect or Disconnect procedures that you specify run only for session-managed client connections
If the client is bound in a session-managed connection, the Connect procedure runs as a persistent procedure. If the client is unbound in a session-managed connection, the Connect procedure runs as a non-persistent procedure. The Disconnect procedure always runs as a non-persistent procedure.
If the Connect procedure is executed as a persistent procedure, and you do not need its context, you can delete it by executing the DELETE PROCEDURE (or DELETE OBJECT) statement on the procedure handle associated with the Connect procedure. If the client is bound in a session-managed connection, the persistent Connect procedure is automatically deleted after the client disconnects.
Note that if the client is unbound in a session-managed connection, there is no guarantee that the PAS for OpenEdge session that runs the Connect procedure for the client application will be the same one that actually processes each request for the client application. Thus, any context that a Connect procedure establishes for an unbound connection must be stored in a file, database, SERVER-CONNECTION-CONTEXT attribute of the SESSION handle (see Managing context for bound and unbound session-managed connections), or some other resource that is accessible through ABL.
Note that both the Connect and Disconnect procedures are optional. There is no requirement to specify either or both of them unless you need the client to be bound to the same PAS for OpenEdge session for the entire life of a session-managed connection.. Additionally, the content of these procedures is completely application specific, and the application server architecture places no constraints on it. Any ABL logic that is valid within an a PAS for OpenEdge session that services a client request is valid for these procedures.