2. Distributed Transaction:
A distributed transaction is a database
transaction in which two or more network hosts
are involved. Usually, hosts provide transactional
resources, while the transaction manager is
responsible for creating and managing a global
transaction that encompasses all operations
against such resources
4. Example of
Nested banking transaction
a.withdraw(10
)
c.deposit(10)
b.withdraw(20
)
d.deposit(20
)
Client A
B
C
T
1
T
2
T
3
T
4
T
D
X
Y
Z
T =openTransactio
nopenSubTransactio
n a.withdraw(10)
;
closeTransaction
openSubTransactio
n b.withdraw(20)
;
openSubTransactionc.deposit(10)
;
openSubTransactiond.deposit(20)
;