Multi-session Agent Startup procedure
- Last Updated: May 21, 2024
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
PAS for OpenEdge uses a multi-session agent, which means that a single agent can concurrently handle requests from several clients, each in its own ABL Session, and each running its own application model. When a multi-session agent starts up, it runs any Agent Startup procedure that you have defined for the PAS for OpenEdge instance. The Agent Startup procedure is executed by the first ABL Session. If it connects to the database there, then that ABL Session will have a connection. But the rest of the sessions will not have the database connection. Agent Startup procedure is the first procedure to run and it runs only once, this ensures no other ABL sessions are initialised until the procedure completes. You can use this procedure to test a database connection and check for database connection failure before running the Agent. For example, if the procedure fails to connect to the database then you can avoid the agent from starting up. You can also use the Agent Startup procedure to verify the availabilty of other non-database resources before permitting the Agent Startup to proceed.
This Startup procedure takes a character string as an input parameter. For example:
|
The ABL Session that executes an Agent Startup procedure runs in session-free mode. Any data that is set in this ABL Session is not available to other ABL Sessions of the multi-session agent.
You use the following properties in openedge.properties to set them: agentStartupProc and agentStartupProcParam.