Try OpenEdge Now
skip to main content
Developing AppServer Applications
Programming the AppServer : Managing stateless connection context : Using the SERVER-CONNECTION-CONTEXT attribute
 

Using the SERVER-CONNECTION-CONTEXT attribute

When a client application establishes a connection with an AppServer, the AppServer broker creates a connection context area in memory for the connection. An AppServer procedure can access this context area using the SERVER-CONNECTION-CONTEXT attribute of the AppServer SESSION handle. This is a readable and writable attribute of type CHARACTER. The initial value of SERVER-CONNECTION-CONTEXT is the unknown value (?).
When any remote procedure executes, it can set the SERVER-CONNECTION-CONTEXT attribute to any application-specific value. Each time that OpenEdge assigns a client request to an AppServer agent, OpenEdge ensures that the SERVER-CONNECTION-CONTEXT attribute is set to the last value assigned in a previous AppServer agent that serviced the same client connection. This value is also available to any Connect procedure, Activate procedure, Deactivate procedure, or Disconnect procedure that you configure for the AppServer. Thus, each AppServer agent that services a client connection can pass context information to the next.
For more information on the Connect, Activate, Deactivate, and Disconnect procedures, see the Using AppServer configuration procedures.