Building Distributed
Applications
Using the Progress AppServer


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 and ActiveX Controller applications that run in separately built and executed processes, this is clear. For 4GL client applications, it is not so obvious because, although both the 4GL client and the AppServer run in separate processes, they both run Progress sessions in which some context is exchanged using a common 4GL mechanism.

Figure 2–1 shows where a 4GL client application and its corresponding AppServer session maintain processing capabilities that are separate and distinct from each other.

Figure 2–1: Separate and Distinct 4GL Sessions

The term client application 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 Application Server processes running on the AppServer.

NOTE: Each AppServer session exists in exactly one Application Server process. 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 Application Server sessions. For more information, see the "Understanding AppServer Operating Modes" section.

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 Design and Implementation Considerations."

To further understand the concept of separate sessions, it is helpful to imagine the existence of a processing boundary between the two sessions. It reinforces the fact that the separate sessions exist. Only remote procedure requests can break through this processing boundary. A 4GL client invokes these requests using the RUN statement and the CONNECT( ) and DISCONNECT( ) methods on a server object handle. For more information, see Programming the Client Application."

For Java and ActiveX clients, specially prepared methods perform the same function, as shown in Figure 2–2. For more information, see the Progress Open Client Developer’s Guide.

Figure 2–2: Separate and Distinct Application Contexts


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095