![]() |
![]() |
All data sent to, received from, or deleted from TSM storage by the X/Open API is performed within a transaction. This provides a high level of data integrity for the TSM product, but it does impose some restrictions that an application client must take into consideration.
Start a transaction with a call to BSABeginTxn and end it with a call to BSAEndTxn.
A single transaction is an atomic action. Data sent or received within the bounds of a transaction either is all committed at the end of the transaction, or all rolled back if the transaction ends prematurely.
The TSM product supports the use of only a single operation type within a transaction. For example, you cannot perform both a send and a get operation within the bounds of a single transaction. The one exception is during a get operation, where you precede the get with a query operation.
Transactions can consist of either single objects or multiple objects. Smaller objects should be sent or received in a multiple object transaction. This greatly improves total system performance, because transaction overhead is decreased. The application client determines whether single or multiple transactions are appropriate.
All objects within a multiple object transaction must be sent to, or received from, the same copy destination. If you must send an object to, or receive it from, a different destination than the previous object, end the current transaction and start a new one. Within the new transaction, you can send or receive the object to the new copy destination.
The TSM product limits the number of objects that can be sent or received in a multiple object transaction. You can find this limit by calling BSAGetEnvironment and examining the MAXOBJ value.
The application client must keep track of the objects sent or received within a transaction in order to perform retry processing or error processing if the transaction is ended prematurely. Either the server or the client can stop a transaction at any time. The application client must be prepared to handle sudden transaction ends that it did not start.