Building Distributed
Applications
Using the Progress AppServer
Using the SERVER-CONNECTION-BOUND-REQUEST Attribute
As explained earlier (see Overview of the Progress AppServer."), a connection from client to a stateless AppServer is in one of two states:
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 "Programming the Client Application"). This call runs and instantiates a persistent procedure in the Application Server process that handles the remote procedure request. The connection thus becomes bound, dedicating this Application Server process to handle all future client requests over the bound connection.
- An Application Server process 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 Application Server process 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 Application Server process.
Once a connection transitions from the bound to the unbound state, the Application Server process 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 Application Server process.
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 Application Server process 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 © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |