A method and apparatus are provided for using a resource manager to
coordinate the committing of a distributed transaction. According to the
method, a first set of changes is communicated to a first resource
manager. In communicating the first set of changes, the changes are
directly communicated to the first resource manager without being received
at a second resource manager. A second set of changes is communicated to
the second resource manager. In communicating the second set of changes,
the changes are directly communicated to the second resource manager
without being received at the first resource manager. Either the first
resource manager or the second resource manager is selected as a
committing coordinator. A commit request message is transmitted to the
committing coordinator to request that the first set of changes be
committed at the first resource manager and that the second set of changes
be committed at the second resource manager. In response to receiving the
commit request message, the committing coordinator causes, as an atomic
unit of work, the first set of changes to be committed at the first
resource manager and the second set of changes to be committed at the
second resource manager.