Try OpenEdge Now
skip to main content
Developing AppServer Applications
Programming the AppServer : Programming for an AppServer session model : Session-free programming
 

Session-free programming

You can develop a session-free (state-free operating mode) application much like a stateless session-managed application. However, a session-free application must follow these additional AppServer programming requirements and recommendations:
*Every request (external procedure) runs independently of every other request on the AppServer. No request can create global or persistent data that any subsequent request can ever expect to find, because each request can execute on a different AppServer or AppServer agent.
*You cannot specify a connect or disconnect procedure, and none is ever executed on the AppServer.
*You can specify Activate and Deactivate procedures to execute before and after each request, but you cannot use them to maintain any contextual data that is not read and written to persistent storage (a database).
*Do not use persistent procedures of any kind, unless you cannot avoid it. (For ABL clients, as an alternative to RUN PERSISTENT, consider using the SINGLE-RUN or SINGLETON option.) Using any persistent procedures (Open Client and Web service ProcObjects) that are called and instantiated directly by the client forces a bound connection to the AppServer, which limits application performance and scalability (see Affectingapplication scalability). Persistent procedures also complicate the programming of session-free client applications, which must maintain connection context with every call to an internal procedure or user-defined function. Also, using the AppServer session to create a persistent procedure internally in response to some other client invocation has limited, if any, value. No external procedure invoked by the client can expect to access any persistent resources created by an AppServer session in response to another client invocation, because the latest remote external procedure is likely to execute in a different AppServer agent than the one in which any of these AppServer-created persistent resources reside.
* Affecting application scalability
* SESSION handle attributes and state-free operating mode