Long description of Figure 1: Using savepoints to control rollbacks
in a transaction (rzahh586.gif)
found in IBM Toolbox for Java: AS400JDBCSavepoint class
This figure illustrates how to use savepoints to control rollbacks in a transaction.
Description
The figure is composed of the following:
- A blue horizontal arrow, pointing to the right, labeled 'Transaction.' The
Transaction arrow represents a linear transaction that begins on the left
and ends on the right.
- Below the Transaction arrow is a multicolored bar of equal length to the
Transaction arrow. The bar is divided into four colored sections that, from
left to right, represent the separate actions that constitute the transaction.
Under the bar are two labels that represent savepoints in the transaction.
- Below the multicolored bar are three arrows positioned one above the other.
The arrows point left, and each one represents rolling back the transaction
to a different point.
The Transaction arrow represents a transaction that begins on the left and
ends on the right. The transaction is composed of a series of separate actions
(the different sections of the multicolored bar). From left to right, the colored
sections represent:
- The first action (a tan section) labeled 'Insert'
- The second action (a green section) labeled 'Update'
- The third action (another tan section) labeled 'Insert'
- The fourth and final action (a blue section) labeled 'Delete'
Labels below the multicolored bar represent savepoints. The point where the
first action ends and the second begins is labeled 'Savepoint A.' The point
where the third action ends and the fourth begins is labeled 'Savepoint B.'
Arrows below the multicolored bar point to the left and represent how the savepoints
affect rolling back the transaction:
- The first arrow points to Savepoint B. Rolling back the transaction to Savepoint
B reverses only the final action (the blue section labeled 'Delete')
- The second arrow points to Savepoint A. Rolling back the transaction to
Savepoint A reverses the second through fourth actions (the green section
labeled 'Update,' the second tan section labeled 'Insert,' and the blue section
labeled 'Delete')
- The final arrow points to the very beginning of the transaction. Completely
rolling back the transaction reverses all of the separate actions