Try OpenEdge Now
skip to main content
Developing AppServer Applications
Design and Implementation Considerations : Security considerations : AppServer session access : Stateless operating mode
 
Stateless operating mode
For a stateless AppServer, you can conveniently set a single export list for all AppServer agents (global to the AppServer session), using the Startup procedure. Because export list settings apply only to the AppServer agent in which they occur, setting and resetting an export list at any other point on a stateless AppServer requires careful attention.
Caution: Setting an export list during remote procedure requests to a stateless AppServer is an error-prone activity. If your application requires this fine degree of control, the rest of this section explains how you can do it. However, you might consider implementing your AppServer using state-aware operating mode, instead.
Like a state-aware AppServer, once you set an export list, the list remains set in the AppServer session until you reset it. For an unbound connection, because you cannot guarantee when an AppServer agent will execute what procedure, you must manage any export list settings appropriately during each request. If you do not, you can leave an unpredictable set of export list settings across AppServer agents in the AppServer pool.
For an unbound connection, you can maintain consistent export list settings using the Connect, Activate, and Deactivate configuration procedures. This is especially useful to provide user-based access control.
To maintain consistent export list settings using the Connect, Activate, and Deactivate configuration procedures:
1. In the Connect procedure, establish an export list based on the authenticated user.
2. Save the export list using stateless context storage, such as the SERVER-CONNECTION-CONTEXT attribute or a context database.
3. In the Activate procedure, retrieve the export list from your stateless context storage and set it using the EXPORT( ) method. The list is now set to filter the current remote procedure call and ensure its validity for the user.
4. In the Deactivate procedure, reset the export list to empty or to any other global session value using the EXPORT( ) method. This leaves the AppServer agent to handle remote procedures calls from all connections, as appropriate.
Note: The Disconnect procedure is not effective to reset a user-based export list, especially for an unbound connection, because the Disconnect procedure can run in an AppServer agent other than the one where the last export list setting occurred.
You can also use the Activate procedure to make application-based settings, where you set the list depending on some application state other than the authenticated user. In this case, you might determine the setting indirectly from stateless context storage or from some other source available to ABL. For more information on using stateless context storage, Programming the AppServersee Programming the AppServer.