Manage context from the server with OERequestInfo objects
- Last Updated: April 24, 2023
- 3 minute read
- OpenEdge
- Version 12.2
- Documentation
The entire application can manage the value of the client context
identifier in the ClientContextId property. For
example, a server session might control the client context identifier for a client using
the OERequestInfo instance returned to the client in
the server response, or act as a client to another server using the OERequestInfo instance sent to that other server in its own
remote request.
In addition to the client context identifier, instances of OERequestInfo provide additional context information that
depends on whether the client or server is originating the instance.
OpenEdge context information accessible by a server session provides:
- OpenEdge version information for the current
server session — The server session can access the
LOCAL-VERSION-INFOattribute on itsSESSIONsystem handle to find its OpenEdge Release information. This object reference attribute returns aProgress.Lang.OEVersionInfoclass instance withOEMajorVersion,OEMinorVersion, andOEMaintVersionproperties that provide this information. This Release information is also returned in the response to each client request. - Server version information returned to a
client — This identifies the OpenEdge Release information for the server
returned to the client from the server session in response to the current client
request. This is the same information provided to the agent using its own
LOCAL-VERSION-INFOattribute. The server session provides this information to the client using theVersionInfoproperty on theOERequestInfoinstance referenced by theCURRENT-RESPONSE-INFOattribute on the session'sSESSIONhandle. The client can then access this information using theRESPONSE-INFOattribute on the server object handle it uses to make a remote request. -
OpenEdge version information of the client application — This
identifies the OpenEdge Release of the client application that executed the current
request. The session can read this information using the
VersionInfoproperty on theOERequestInfoinstance referenced by theCURRENT-REQUEST-INFOattribute on the agent'sSESSIONhandle. -
Client context identifier for the current request — This is
the value of the
ClientContextIdproperty on theOERequestInfoinstance referenced by the server handle'sREQUEST-INFOattribute when the client makes a remote request. The server session can retrieve this property value on theOERequestInfoinstance referenced by theCURRENT-REQUEST-INFOattribute on itsSESSIONhandle. -
Identifier for the current request only — The client
automatically generates a globally unique identifier for the current request in the
RequestIdproperty on theOERequestInfoinstance referenced by the server handle'sREQUEST-INFOattribute. The server session can read this property value on theOERequestInfoinstance referenced by itsSESSIONhandle'sCURRENT-REQUEST-INFOorCURRENT-RESPONSE-INFOattribute. This value is read-only and cannot be changed by any application code. -
Client context identifier in response to the current request
— Before completing its current request, the server session handling the request
can set a different client context identifier value as a part of its response to the
client by setting the
ClientContextIdproperty available through theCURRENT-RESPONSE-INFOattribute of itsSESSIONhandle. Otherwise, by default, the existing property value available through itsCURRENT-REQUEST-INFOattribute is used. The client can read this value after the remote request completes using theRESPONSE-INFOattribute on the server handle.
For more information on these class properties and handle attributes, see the ABL Reference.
For session-free connections, the typical way for both the client and server to manage context is for both the client and server to manage context. A client request can be executed, not only on any available session on the server, but on any one of many servers that support the business application for a single user login session. You can also use this same configuration for one or more servers that support a single user login session for an unbound session-managed application..
Because none of the context management attributes provided for a
session-managed application work for a session-free application (except for the SERVER-CONNECTION-BOUND attribute), the context database
must:
- Be shared by all server instances that support the user login session
- Use an entirely application-defined means (such as the
ClientContextIdproperty) to identify and distinguish user login session and to key the context database for this purpose
Together with this context database, you can use the Activate and Deactivate configuration procedures to restore context for every client request or provide the necessary context database management solely within each session handling the remote requests.
For more information on managing context from the ABL client, see Accessing client context regardless of application model.