Application model context management
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
PAS for OpenEdge can store ABL session context from the time a session Startup event procedure runs
and initializes the session context, to the time a session Shutdown event procedure runs
and cleans it up. ABL session context is defined by whatever state and data an ABL
business application creates and applies to all PAS for OpenEdge clients. The business
application can then manage this session context on a request by request basis. PAS
for OE also supports session access to client context. Client context is client specific
state and session data that is initialized at the time the client connects and a Connect
event procedure runs, to the time the client disconnects and a Disconnect event
procedure runs and cleans up this client state and data. Because PAS for OpenEdge's
session-managed and session-free client connections optimize memory resources in the
multi-session agent, each client's ABL event procedures and ABL requests can execute in
any ABL session in any multi-session agent. You must therefore ensure that the ABL
business application makes the client context available to any ABL session, running in
any multi-session agent, and in any application model that your application supports.
Both ABL session and client context persist in an ABL session across request boundaries.
The aspect they share is that the ABL application is responsible for initializing them,
maintaining them, ensuring the correct context is available for any given client's
request, and for cleaning it up. PAS for OpenEdge supports both automatic and manual
binding of a client to a single ABL session handling a client request (including client
connection) in a multi-session agent. Automatic binding to the current ABL session
handling a request happens when a PAS for OpenEdge client runs a persistent procedure, and the
binding is removed when the client deletes that persistent procedure. Manual binding to
a current session-managed ABL session is managed by the PAS for OpenEdge business application
by setting and clearing the SESSION:SERVER-CONNECTION-BOUND-REQUEST
attribute. When a client is bound to a single ABL session using either mechanism, the
session can then maintain context in memory between client requests, and the PAS for OpenEdge
business application can then support transaction management that allows a single
database transaction to span multiple client requests."