WebSpeed
Developer’s Guide


Managing Multi-page DB Transactions

The mechanism for controlling multi-page database transactions consists of two web-utilities-hdl method procedures that you can execute within process-web-request:

As you can see, get-transaction-state can return two more states than you can set with set-transaction-state. This is because when you start or terminate a multi-page transaction, there is no effect until the next request service in the current Agent WebSpeed transaction. Thus, a transaction state of "NONE" means both that there is no multi-page database transaction current and none has been requested. Likewise, a transaction state of "ACTIVE" means both that there is an active multi-page transaction and no termination request has been issued.

Conversely, if the transaction state is "UNDO-PENDING" or "COMMIT-PENDING", there is an active transaction that will terminate by the next Web request service on this Agent. "RETRY-PENDING" means there is an active transaction that will be thrown away and there will be a new active transaction by the start of the next request.

Note that you cannot set any state at any time. Some transaction states preclude the setting of others and an error is returned when you violate theses requirements:

Thus, you cannot change a transaction state that you have previously set in the same request service.

Although you cannot start a multi-page transaction when no WebSpeed transaction is active on the Agent, you receive no error for trying. The Agent (web-disp.p) resolves the transaction request with the "NONE" state by default.


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