Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming ABL Client Applications : Accessing the connection ID on a session-managed client
 

Accessing the connection ID on a session-managed client

On a session-managed ABL client, a connection ID for a PAS for OpenEdge connection is available as the value of the CLIENT-CONNECTION-ID attribute on the server object handle for the connection. This is a read-only attribute of type CHARACTER that PAS for OpenEdge generates for every session-managed client connection. For an Open Client application, OpenEdge provides appropriate common methods to access the connection ID (see OpenEdge Development: Open Client Introduction and Programming).
Note: The CLIENT-CONNECTION-ID is provided for backward compatibility only. In order to maintain client connection context for an application regardless of model, use the ClientContextId property on the Progress.Lang.OERequestInfo class. For more information on using this property, see Accessing client context regardless of application model.
For a client, the connection ID of a given PAS for OpenEdge connection remains the same until the client disconnects from the PAS for OpenEdge instance. If the same client reconnects to the same instance, the connection ID of the new connection (and thus the value of the CLIENT-CONNECTION-ID attribute for that connection) is different from the connection ID of any previous connection. The CLIENT-CONNECTION-ID attribute works only on an ABL client running in the session-managed application model.
The CLIENT-CONNECTION-ID value is also shared with the SERVER-CONNECTION-ID attribute on the PAS for OE SESSION handle. This value can therefore be used by both the client and server to maintain a consistent client context for a session-managed connection. This value can also be useful to provide a common audit trail ID for any server and client running a session-managed application.
For information on how to use this value to manage connection context, see Managing context for bound and unbound session-managed connections. For information on how to use this value in audit trails, see Audit trails.
Note: For an ABL client in a session-free application, the CLIENT-CONNECTION-ID attribute always has the Unknown value (?) because there is no sustained client connection to the server in a session-free application.