Try OpenEdge Now
skip to main content
Application and Integration Services
AppServer for OpenEdge Applications : How does a remote procedure execute? : The concept of separate sessions

The concept of separate sessions

An AppServer and its client applications run in separate sessions. Essentially, this means that they have no context in common. For Java, .NET, or Web service client applications that run in separately built and executed processes, this is clear. For ABL client applications, it is not so obvious because, although both the ABL client and the AppServer run in separate processes, they both run OpenEdge sessions in which some context is exchanged using a common ABL mechanism.
To reinforce the concept of separate sessions, it is helpful to imagine the existence of a processing boundary between the two sessions. Only remote procedure or user-defined function requests can break through this processing boundary. An ABL client invokes these requests using the RUN statement, function invocation, and the CONNECT( ) and DISCONNECT( ) methods on a server object handle. For more information, see the information on programming ABL clients in OpenEdge Application Server: Developing AppServer Applications.
The following figure shows where an ABL client application and its corresponding AppServer session maintain processing capabilities that are separate and distinct from each other.
Figure 7. Separate and distinct ABL sessions
The term client session refers to all processing activities that occur within the context of the client application. Similarly, the term AppServer session refers to all processing activities that take place exclusively in the context of AppServer agents running on the AppServer.
Note: A given AppServer session exists in exactly one AppServer agent at any given moment. However, depending on the operating mode configured for an AppServer, the requests that a client application sends over a given connection can be processed in one or more AppServer agent sessions. For more information, see the information on understanding AppServer operating modes in OpenEdge Application Server: Developing AppServer Applications.
These two sessions maintain a clear separation of context: persistent procedures, transactions, database connections, AppServer connections, and database trigger events are separately scoped and operate only in the session in which they are invoked.
For example, even if a database is connected within an AppServer session, the client application must also connect to the database using a separate database connection if it wants direct access. For more information on managing database access in a distributed application environment, see OpenEdge Application Server: Developing AppServer Applications. However, for a WebClient™, the only way to access a database through ABL is through an AppServer session (see OpenEdge Deployment: WebClient Applications).
For Java, .NET, and Web service clients, specially prepared methods perform the same function, as shown in the following figure.
Figure 8. Separate and distinct application contexts
For more information, see OpenEdge Development: Open Client Introduction and Programming.