NonStop Server for Java 7.0 Programmer's Reference

Table 13 Current Class methods (continued)
DescriptionMethod
Modifies the time-out value associated with transactions started by subsequent
invocations of the begin method.
set_timeout
Suspends the association of the calling thread with a transaction context.suspend
The following code fragment shows how to use the begin() and commit() methods of the
Current class:
import com.tandem.tmf.Current;
Current tx = new Current();
// start a new transaction in the current thread
tx.begin();
// ... access Pathway server
// commit current transaction (JDBC and Pathway)
tx.commit(true);
For more information on the Current class, see com.tandem.tmf package description in the
JToolkit for Java API Reference Pages.
Java transaction API
NSJ7 supports transactions by means of the NonStop Server for Java Transaction API (JTA), which
is an implementation of the Oracle JTA Version 1.0. NonStop Server for Java Transaction API
implements parts of the Oracle JTA package (javax.transaction). NSJ7 includes the NonStop
Server for Java Transaction API package (com.tandem.jta).
The NonStop Server for Java Transaction API provides a standard interface for transactions on
both homogeneous NonStop systems by means of TMF and heterogeneous CORBA systems by
means of JTS.
The version of NonStop Server for Java Transaction API that uses TMF is called NonStop Server
for Java Transaction API-TMF and the version of NonStop Server for Java Transaction API that uses
JTS is called NonStop Server for Java Transaction API-JTS. Both have identical interfaces. You can
specify TMF or JTS when you use JTAFactory.getUserTransaction to get a reference to
javax.transaction.UserTransaction. (See “Examples” (page 84)). The default is TMF.
NonStop Server for Java Transaction API-TMF is intended for applications other than CORBA
applications.
This subsection explains the following topics:
javax.transaction interfaces” (page 83)
“javax.transaction exceptions” (page 84)
“Examples” (page 84)
For more information about Oracle JTA, see Oracle JTA document.
javax.transaction interfaces
Oracle JTA package (javax.transaction), defines the following interfaces:
Status
Synchronization
Transaction
TransactionManager
UserTransaction
Java transaction API 83