CORBA 2.6 Programmer's Guide for C++
Transaction Branches and the Diamond Access
Problem
Because of the way TMF handles distributed transactions, you may need to design your application to
avoid database access deadlocks between transaction branches, sometimes called the diamond access
problem. This problem is not specific to NonStop CORBA, and can occur in any system where TMF is
used. It is most likely to occur in highly distributed applications with distributed databases.
Each import and export of a transaction to a different process creates a new transaction branch. In the
TMF environment these branches are loosely coupledthat is, the work of two transaction branches is not
recognized as being part of the same transaction. Therefore, two transaction branches attempting to lock
the same SQL data may encounter SQL errors or deadlocks.
The diamond access problem occurs when an application begins a transaction on one system and
subsequently invokes multiple transactional objects on multiple systems. Figure 61 illustrates one way
that the problem can arise.
Figure 7.1. Diamond Access Problem