Try OpenEdge Now
skip to main content
Developing AppServer Applications
AppServer and Client Interaction : Understanding AppServer operating modes : State-aware operating mode : Context management
 
Context management
Unlike state-reset, an AppServer running in state-aware operating mode does not reset its session context between client connections. Instead, OpenEdge maintains any context created in the AppServer session until you specifically delete it in some procedure that you write.
For an AppServer running in state-aware operating mode you can also configure Startup and Shutdown procedures that run in every AppServer session when it starts up and shuts down. You can use these procedures to establish and discard run-time context that the AppServer maintains in common for all connections. For more information on the Startup and Shutdown procedures, see Programming the AppServer.
Like state-reset, because each AppServer agent is dedicated to a client connection, the AppServer maintains all session context between client requests. Thus, for example, any global values or database connections that you set in remote procedures remain available for the life of the connection or until you change them during some remote procedure call.
As noted in a previous section, an AppServer session running in state-aware operating mode maintains most of its context between client connections. However, it does delete any remote persistent procedures that are still active when the connection terminates.