WebSpeed provides an HTML-generating Web object that allows you to start and terminate multi-page database transactions. This is tran-tst.w in the WebSpeed examples directory. This Web object allows the user to view and update the CustNum and name fields of the Customer table. There are buttons to change the object between State-Aware and State-Less. There are also buttons to set the Transaction-State to Start, Undo, Retry, and Commit.
To start and terminate multi-page database transactions:
1. Run tran-tst.w in your favorite broker.
2. Press the State-Aware button.
3. Press the Start button. This request sets up web-disp.p to start the transaction FOR THE NEXT REQUEST. Any updates made in this request are OUTSIDE THE TRANSACTION.
4. Press the Refresh button. This shows that the transaction state has changed to "ACTIVE".
5. Type 1 in the CustNum field and type New Name for Skiing in the Name field.
6. Press the Update button.
7. Type 2 in CustNum and New Name for Frisbee in Name.
8. Press the Update button.
9. Continue similarly Steps 7 and 8 as long as you want.
10. Press the Undo button. This tells web-disp.p to undo the changes. However, the changes will not actually be undone until this request ends. The customer list at the bottom (which is created in the current request) still shows the changed names.
11. Press the Refresh button. Now the name changes are undone.