CORBA 2.6.1 Programmer's Guide for Java
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 Java applications are referred to collectively as NSJTS. Together, they implement
the
CosTransactions module of the Transaction Service to provide distributed transactional execution. These components also implement the
low-level Java mapping of the OTS as defined in the Java Transaction Service (JTS) specification, version 1.0, from Sun Microsystems,
Inc.
The JTS_Bank sample is a set of programs that illustrate the use of NSJTS. 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
NSJTS consists of the following components:
JTS, a special client stub that implements the JTS 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
NSJTS uses the NonStop Transaction Management Facility, or TMF, for transaction management. NSJTS serves in both superior and
subordinate roles to TMF.
NSJTS 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 NSJTS to
recover any in-doubt transactions following a failure.
When an exception is initiated by TMF, NSJTS 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 NSJTS:
Nested transactions
TransactionFactory interface (you should design applications to use the org.omg.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, NSJTS attempts to enforce the rule that only one thread may remain active in a transaction at