CORBA 2.3.3 Programmer's Guide for Java
In this figure, the application starts a debit/credit transaction on System A. The debit account is held on
System B and the credit account is held on System C. System D has an object that requires input from
both debits and credits (in this case a Bank Vault Account that tracks debits and credits). The problem
occurs when Systems B and C attempt to write to the Bank Vault object on System D. At that time, one
write operation might be locked out by the other. The transaction monitor at that point doesn't know to
end or cancel the transaction, because it doesn't see the interactions between B, C, and D. D doesn't know
that both attempts to write to it belong to one transaction.
You can avoid diamond access by changing the distribution of the application across systems. For
example, if Systems B and C were the same system, the problem would be avoided.
Another solution is to set a timeout for the transactions in these complex situations, using the
org.omg.CosTransactions.Current.set_timeout() operation. Although the problem can
still occur, the blocking transaction times out after the specified interval, and the block is then lifted.