WebSpeed
Developer’s Guide
Guidelines for Usage
Here are some helpful hints on using multi-page database transactions:
- Make sure there is at least one state-aware Web object.
- RUN set-transaction-state ("START"), and:
- Continue processing requests in this Agent. Remember that all requests handled by the Agent (even stateless ones) are done within this transaction.
If the user has a locked Agent and that Agent has a multi-page transaction, then every thing done by that user will be in the transaction. Be very careful about this. The user might go back to another page or try to run another Web object. Even if these are not state aware themselves, if the Agent runs them, then their changes will be within the transaction.
- When the user is done, set the transaction state to either "UNDO" or "COMMIT". Also set all the Web objects to stateless. Remember that setting all the objects to stateless automatically performs an "UNDO" unless you explicitly commit the transaction ahead of time.
- If you decide to set "UNDO" or "RETRY", remember that changes made within the same Web request will also be undone. That is, code such as:
This code shows the new name for the customer. However, the change will be undone with the rest of the transaction.
- Remember to consider the case of an Agent (WebSpeed transaction) time-out. This will also force an "UNDO" of the multi-page transaction.
Finally, Figure 9–7 shows a flow chart of the WebSpeed multi-page transaction model. It summarizes most of what is described in this section and can serve as a visual guide to the actual process of managing these database transactions.
Figure 9–7: WebSpeed Multi-page Transaction Model
![]()
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |