Transaction is associated to a thread from where it was created. Transaction may have more than one resource attached.
Committing and rolling back transaction actually performs commit/rollback on all attached resources. Therefore, it may happens that committing of one resource fails, what actually breaks the atomicity of the transaction. If transaction is attached just to one resource, atomicity is saved.
Only one resource of some type may exists in the transaction. There is no way to have two resources of the same type in one transaction.
This class is responsible for transaction life-cycle. It can be consider that all work is scoped to associated thread.
|
|