All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bea.jolt.JoltTransaction

java.lang.Object
   |
   +----bea.jolt.Transaction
           |
           +----bea.jolt.JoltTransaction

public class JoltTransaction
extends Transaction
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.

See Also:
JoltRemoteService, JoltSession

Constructor Index

 o JoltTransaction(int, Session)
The constructor (or the method that is invoked automatically when a new instance of a class is created) implies the beginning of the transaction.

Method Index

 o commit()
Commit the transaction.
 o getSession()
Get the session associated with this transaction.
 o rollback()
Roll back or abort the transaction.

Constructors

 o JoltTransaction
 public JoltTransaction(int timeout,
                        Session session) throws TransactionException
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
See Also:
JoltSession, call

Methods

 o getSession
 public Session getSession()
Get the session associated with this transaction. If this transaction has been committed or aborted, it returns null.

Returns:
The session object, or null.
Overrides:
getSession in class Transaction
See Also:
JoltSession
 o commit
 public synchronized void commit() throws TransactionException
Commit the transaction. Once the transaction is committed or aborted because of failure (TPEABORT), this transaction is obsolete.

Throws: TransactionException
A transaction error has occurred.
Overrides:
commit in class Transaction
 o rollback
 public synchronized void rollback() throws TransactionException
Roll back or abort the transaction. Once the transaction is rolled back, this transaction is obsolete.

Throws: TransactionException
A transaction error has occurred.
Overrides:
rollback in class Transaction

All Packages  Class Hierarchy  This Package  Previous  Next  Index