Generate a client context identifier
- Last Updated: January 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
The client context identifier is typically a globally unique character
string. For performance, the maximum length of the string should be less than 36
characters. The client context identifier can also be a blank ("") value or the Unknown value (?).
The following code fragment shows a recommended ABL assignment statement for generating a unique value for the client context identifier:
|
This is only one of the methods you can use to generate a client context identifier, but it does generate a globally unique value.
The default method of generating the client context identifier is to allow the clients (ABL, Java, and .NET) to automatically generate the value and send it to the server. Optionally, the client or the server session can create their own client context identifier for advanced application logic.
For example, the client context identifier in an ABL session needs to be reset
in order to indicate the end of the client user login session. This is typically done
when the server invalidates the current client login session by invoking the LOGOUT( ) method on the client-principal object that
maintains the session, and by removing the client login context from the context store.
The server then typically sets the ClientContextId
property on the appropriate Progress.Lang.OERequestInfo
class instance (available through the CURRENT-RESPONSE-INFO attribute on the SESSION handle) to the Unknown value (?).
This tells the client that its current login session has been terminated, and any
subsequent (presumably invalid) requests from the client on the same server connection
will contain a client context identifier with the Unknown value
(?). For more information on client-principal objects and using the ClientContextId property to manage context for user login
sessions, see "Implementing multi-tier security models" topic in Application
Development with PAS for OpenEdge guide, and the topics on authenticating the
user identity for multi-tier applications in OpenEdge Programming
Interfaces.