Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming the Progress Application Server for OpenEdge : Managing client context for session-free and unbound session-managed connections : Passing the client context identifier between client and server
 
Passing the client context identifier between client and server
OpenEdge provides a class, Progress.Lang.OERequestInfo, and its properties to hold the value of the client context identifier and related context information. OpenEdge provides instances of OERequestInfo for reference by attributes both on the server object handle that an ABL client uses to make remote requests, and on the SESSION system handle of the server session that processes the request. These attribute references include:
*On a client's server object handle (or a returned asynchronous request object handle):
*REQUEST-INFO — Referencing context information that is sent with a client request to the server associated with this handle
*RESPONSE-INFO — Referencing context information that is returned to the client with the response from the most recent request sent to the server associated with this handle
*On the server session's SESSION handle:
*CURRENT-REQUEST-INFO — Referencing context information that is received from the current client request to the server. This is the same information that the client sends from the REQUEST-INFO attribute on the server object handle associated with the request.
*CURRENT-RESPONSE-INFO — Referencing context information that is returned from the server in response to the current client request. This is the same information that the client receives in the RESPONSE-INFO attribute on the server object handle associated with the request.
The ClientContextId property on an OERequestInfo object holds the client context identifier value that is generated and passed between a client and server. Additional properties identify other information about the request, including the remote procedure call (ProcedureName), a unique ID that OpenEdge generates for each request (RequestId), and OpenEdge release information (VersionInfo) about the client that sends the request or the server that returns the response, depending on the handle and attribute that provides the information.
As noted previously, the ClientContextId property value typically serves as a primary key to the client context information maintained in a context store for a user login session, which might be initialized by an authentication service that handles the user login. Subsequently, when the client executes a remote procedure on the server, it again propagates the client context identifier (and related information) from the REQUEST-INFO attribute on the server handle, and the server session can then retrieve the identifier from its SESSION handle using the CURRENT-REQUEST-INFO attribute. Before the remote procedure returns, it can modify the context identifier referenced by the CURRENT-RESPONSE-INFO attribute on the SESSION handle, and the client can retrieve the updated identifier returned using the RESPONSE-INFO attribute on the server handle (or on the returned asynchronous request object handle for an asynchronous request).
For more information on these attributes and examples that access the ClientContextId property, see the reference entries for these attributes in OpenEdge Development: ABL Reference. For more information on using the ProcedureName property, see Accessing the name of the current remote procedure.