Session models
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
The OpenEdge Adapter for Sonic ESB, like the WSA, supports two session models:
- Session-managed—While a transaction is in progress between the service and a client, the connected PAS for OpenEdge instance is dedicated exclusively to that client. The PAS for OpenEdge maintains the context of the transaction until it responds to all requests from the client and the transaction is complete. The session-managed model is available for the stateless, state-aware, and state-reset PAS for OpenEdge operating modes, and it can be used with all Open Client types (.NET and Java clients as well as web service clients) and OpenEdge clients.
- Session-free—PAS for OpenEdge does not maintain a transaction context. PAS for OpenEdge returns a complete result in response to each single request, and it does so without regard to any previous responses to the client from itself or any other PAS for OpenEdge process. Any available PAS for OpenEdge processes launched by qualified PAS for OpenEdge broker can process requests from the client in parallel, because each transaction is independent of all others. The session-free model is available on all clients, and it requires PAS for OpenEdge to run in state-free mode.
When you program services that are managed by the OpenEdge Adapter for Sonic
ESB and their clients, it is preferable to write applications to take advantage of the
session-free model. By doing so, you avoid the need to write code to manage connections.
Similarly, it is best to avoid including SubAppObjects or
ProcObjects (persistent procedures) when generating the client proxy for
the PAS for OpenEdge application, because such objects are processed in a session-managed mode
even if the session-free model is specified for the top-level AppObject. In
general, the session-free model without the use of subobjects requires less complex
programming. It also allows for better performance and scalability, because multiple PAS for
OpenEdge instances and processes can be made available to handle requests in parallel.
The following figure shows the Proxy Generator window and the Progress Explorer window where you set the applicable options for the session model and PAS for OpenEdge operating mode.