Release 10.1A: OpenEdge Application Server:
Developing AppServer Applications

> ## Using the SERVER-CONNECTION-BOUND-REQUEST attribute

> As explained earlier (see Chapter 1, " AppServer and Client Interaction."), a connection from client to a stateless AppServer is in one of two states:

> - Unbound — Where remote procedure requests over the connection can be handled by any available AppServer agent running on the AppServer.

> - Bound — Where remote procedure requests over the connection are handled by a single AppServer agent dedicated to the connection.

> By default, a connection on a stateless AppServer is unbound.

> ##### Making a connection bound

> An unbound connection can become bound in two ways:

> - A client application can call a remote persistent procedure (see Chapter 3 "Programming Progress 4GL Client Applications") or instantiate a ProcObject, in the case of an Open Client or Web service client. This call runs and instantiates a persistent procedure in the AppServer agent that handles the remote procedure request. The connection thus becomes bound, dedicating this AppServer agent to handle all future client requests over the bound connection.

> - An AppServer agent handling a request from a client can run a procedure that sets the `SERVER-CONNECTION-BOUND-REQUEST` attribute on the `SESSION` handle to `TRUE`. The connection thus becomes bound, dedicating the AppServer agent that sets this attribute to handle all future client requests over the bound connection.

> Note that it is the successful instantiation of a remote persistent procedure that forces the connection to transition from the unbound state to the bound state. If a client fails in its attempt to instantiate a remote persistent procedure on an unbound connection, the connection remains unbound.

> ##### Making a connection unbound

> You can request that a connection become unbound by setting the `SERVER-CONNECTION-BOUND-REQUEST` attribute on the `SESSION` handle to `FALSE`. However, the connection only becomes unbound as long as there are no remote persistent procedures still active in the AppServer agent.

> Once a connection transitions from the bound to the unbound state, the AppServer agent can handle the next request sent by any connected client. Conversely, the next request sent by the client on the previously bound connection can be handled by any AppServer agent.

> If remote persistent procedures are active on a bound connection, setting the `SERVER-CONNECTION-BOUND-REQUEST` attribute to `FALSE` has no effect until all remote persistent procedures in the AppServer agent are explicitly deleted. When all remote persistent procedures are deleted, the connection either remains in the bound state or becomes unbound depending on the last setting of the `SERVER-CONNECTION-BOUND-REQUEST` attribute.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095