CORBA 2.6.1 Programmer's Guide for C++

Chapter 7. Managing Transactions
Chapter 7. Managing Transactions
Components of Transaction Service Implementation
Use of TMF
Transaction Service Features Not Supported in NonStop CORBA
TransactionalObject Interface
Checked Transaction Behavior
Transaction Branches and the Diamond Access Problem
This section describes the NonStop CORBA implementation of the Transaction Service (formerly known as the Object Transaction
Service, or OTS) and explains programming considerations for transactions in NonStop CORBA applications.
The Transaction Service components of NonStop CORBA for C++ applications are referred to collectively as NSOTS. Together, they implement
the
CosTransactions module of the Transaction Service to provide distributed transactional execution.
The OTS_Bank sample is a set of programs that illustrate the use of NSOTS. The Readme file for this sample provides a description and
walkthrough of these programs, including how to build and run them.
Components of Transaction Service Implementation
NSOTS consists of the following components:
OTS, a special client stub that implements the OMG Transaction Service API
NSotsTM, a process that collaborates with the Transaction Management Facility (TMF) on the NonStop system to manage transactions
and that can run as a TS/MP server pool
NSotsXID, a singleton process used to broker transaction identifiers (XIDs) when NSotsTM runs as a TS/MP server pool with multiple
processes
Use of TMF
NSOTS uses the NonStop Transaction Management Facility, or TMF, for transaction management. NSOTS serves in both superior and
subordinate roles to TMF.
NSOTS and TMF communicate through a pseudo-file called a recoverable resource manager (RM) file. They exchange signals through this file
using the TMF APIs. These signals are used to start and terminate transactions. The RM file is also used during the initialization of NSOTS to
recover any in-doubt transactions following a failure.
The operations
tmf_start and tmf_end are added to the CosTransactions::Current interface to control the participation of NSOTS in
outstanding TMF transactions.
When an exception is initiated by TMF, NSOTS assigns the TMF error code to the CORBA exception minor code.
Transaction Service Features Not Supported in NonStop CORBA
The following features of the Transaction Service are not supported by NSOTS:
Nested transactions
TransactionFactory interface (you should design applications to use the CosTransactions::Current interface)
Explicit propagation of transactions
TransactionalObject Interface
An application-defined interface that inherits from the TransactionalObject interface indicates that any transactional context associated with the
client thread should be associated with operations on the object's interface.
Note:
In the OMG Transaction Service version 1.2, use of the
TransactionalObject interface is deprecated in favor of POA
policies.
Checked Transaction Behavior
In performing checked execution for transactions, NSOTS attempts to enforce the rule that only one thread may remain active in a transaction