SERVER-CONNECTION-CONTEXT attribute

(AppServer only; PAS for OE only)

An application-determined value that you set within an AppServer agent. The AVM passes this value to each AppServer agent that executes a request on behalf of the client connection identified by the SERVER-CONNECTION-ID attribute.

Data type: CHARACTER

Access: Readable/Writeable

Applies to: SESSION system handle

This attribute is valid only if the REMOTE attribute is TRUE.

When a client application requests a connection with an AppServer, the AppServer broker creates an area to store this value for the connection. The initial value is the Unknown value (?).

This attribute, while available in all AppServer operating modes, has practical application only on a stateless AppServer, where more than one AppServer agent can service the same client connection. This value is available to any Connect procedure, Activate procedure, Deactivate procedure, or Disconnect procedure that you have configured for the AppServer, as well as any application procedure. Thus, each AppServer agent that services a client connection can pass context information to the next.

For an AppServer agent, the AVM sets the SERVER-CONNECTION-CONTEXT attribute to the Unknown value (?) each time a new connection is assigned to the process. If the AppServer operating mode is state-aware or state-reset, the AppServer agent procedure can also reset this attribute to an application-specific value. However, any such value does not last beyond the current client connection within the current AppServer agent session. Thus, AppServer agents running on a state-aware or state-reset AppServer cannot pass information among themselves using this attribute.

In state-free operating mode, any attempt to set this attribute raises a WARNING condition in the AppServer agent, which writes a message to the AppServer log file, and the value remains unchanged. You can handle the WARNING condition by including the NO-ERROR option in the statement that attempts to set the value, and checking ERROR-STATUS:NUM-MESSAGES for a value greater than zero. In state-free operating mode, this attribute always has the Unknown value (?).

Note: The state-free limitation described above does not apply to PAS for OpenEdge, which does support the SERVER-CONNECTION-CONTEXT attribute in the state-free operation mode.