Try OpenEdge Now
skip to main content
Developing AppServer Applications
AppServer and Client Interaction : Session models and application services : Deciding on the scope of individual requests : Session-free operations
Session-free operations
For a session-free application, whether simple or complex (powerful), each operation must complete any transaction that it starts. Operations typical of this type of application include returning the current outdoor temperature given a zip code, or returning a zip code given a street address. A more powerful example might be an operation that returns all the available seats on airline flights to a given destination, followed by another operation that attempts to reserve a selected list of seats on any of the available carriers, based on a set of parameterized preferences, or specifically by seat number. In all cases, these operations complete their function in one request, and if a result is in some way unsuccessful, the request might simply be repeated with or without modification of the parameters involved.
Context can, however, be maintained for a session-free application if the client maintains the context between requests using input-output parameters provided by the application service procedures or Web service operations. An example might be an order entry Web service that allows a user to obtain status of a particular order, then examine the detail lines of that order.
In this case the context might be a customer number passed in a getOrders procedure to get the status of all that customer's orders. This might be followed by a getOrderLines procedure for a selected order, with both the customer number and order number passed as parameters to get the detail lines of a selected order for the customer. In this case, the context is really being maintained in persistent storage, such as a database, that is shared by all clients of the application.