public class JoltTransaction
extends java.lang.Object
The JoltTransaction class is the explicit transaction model for Jolt.
The JoltTransaction class implements the transaction object. This object
can be used by JoltRemoteService to include several services into a single
transaction. When a transaction times out, your application must roll back
the transaction immediately. In the current implementation of Tuxedo,
only one transaction object can be instantiated at one time.
The constructor (or the method that is invoked automatically when
a new instance of a class is created) implies the beginning of the
transaction. The session parameter in the constructor ensures
that the transaction does not span over multiple sessions. The
current Jolt release allows only one transaction per session.
The JoltTransaction constructor requires that you set the timeout
for a transaction. Specifying a timeout parameter of zero sets
the timeout to the maximum value for the system. If the
transaction is not completed within this period of time
(the time between the tpbegin() and the tpcommit()), then Jolt
generates a TransactionException.
The RECVTIMEOUT for each transactional JoltRemoteService.call()
is automatically adjusted to the proper timeout value.
Parameters:
timeout - A suggested transaction timeout value in seconds
session - The session which the transaction belongs to
Throws:
TransactionException - Another transaction is already in
progress, or invalid session object