NonStop Server for Java Programmer's Reference (NSJ 4.0+)
Table Of Contents

Current Class Methods
The Current class is based on version 0.5 of the Java Transaction Services (JTS) specification.
The following table describes the Current class methods.
Method Description
begin
Starts a new transaction and associates it with
the calling thread.
commit
Commits the transaction associated with the
calling thread.
get_control Gets a Control object representing the
transaction associated with the calling thread.
get_status
Gets the status of the transaction associated with
the calling thread.
get_transaction_name
Gets a descriptive name of the transaction
associated with the calling thread.
resume
Sets or resumes association of a transaction with
the calling thread.
rollback
Rolls back the transaction associated with the
calling thread.
rollback_only
Marks the transaction associated with the calling
thread so that the only possible outcome is to
roll back the transaction.
set_timeout
Modifies the time-out value associated with
transactions started by subsequent invocations of
the begin method.
suspend
Suspends the association of the calling thread
with a transaction context.
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();