Try OpenEdge Now
skip to main content
Messaging and ESB
Guidelines for Using and Programming for the OpenEdge Adapter for Sonic ESB : Service definition considerations : Session models

Session models

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 AppServer is dedicated exclusively to that client. The AppServer maintains the context of the transaction until it has responded to all requests from the client and the transaction is completed. The session-managed model is available for the stateless, state-aware, and state-reset AppServer 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 — The AppServer does not maintain a transaction context. The AppServer 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 Application Server process. Any available Application Server processes launched by any qualified AppServer broker can process requests from the client in parallel, since each transaction is independent of all others. The session-free model is available on all clients, and it requires that the AppServer be running in the state-free mode.
In programming for services managed by the OpenEdge Adapter for Sonic ESB and their clients, it is generally 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 desirable to avoid including SubAppObjects or ProcObjects (persistent procedures) when generating the client proxy for the AppServer 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 sub-objects requires less complex programming. It also allows for better performance and scalability, since multiple AppServer 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 the AppServer operating mode.
Figure 8. Recommended options for OpenEdge Adapter for Sonic ESB services