Try OpenEdge Now
skip to main content
Developing AppServer Applications
AppServer and Client Interaction : Understanding AppServer operating modes : State-free operating mode : Context management
 
Context management
An AppServer running in state-free operating mode can provide context management in the following ways:
*Using persistent storage managed by the application ("roll your own"), such as a database that is keyed to specific clients or common information used by all clients
*When a client binds an agent to itself by instantiating a remote persistent procedure (see Connectionmanagement).
*Using the client context identifier, a globally unique identifier used to manage client login session context. For more information on the client context identifier, see Managing state-free and stateless client context.
An agent does not reset any session context between client requests. However, there is no guarantee what client the agent will service next. So, allowing AppServer procedures when they are invoked to create persistent procedures or other objects that remain in the context of an agent after it services a client provides little benefit and is likely to create harmful memory leaks in the agent session. The exception to this is when a procedure is run as a single-run or singleton, which allows persistent procedures to be run in a state-free AppServer without binding. For more information on the single-run and singleton options, see Running and managing remote procedures .
For an AppServer running in state-free 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 across all client requests. For more information on the Startup and Shutdown procedures, see Programming the AppServer.