com.scooterframework.transaction
Class JtaTransaction

java.lang.Object
  extended by com.scooterframework.transaction.AbstractTransactionImpl
      extended by com.scooterframework.transaction.JtaTransaction
All Implemented Interfaces:
Transaction

public class JtaTransaction
extends AbstractTransactionImpl

JtaTransaction class


Field Summary
 
Fields inherited from class com.scooterframework.transaction.AbstractTransactionImpl
bAllResourcesReleased, bTransactionHasCommitted, bTransactionHasEnded, bTransactionHasRollbacked, bTransactionHasStarted, connList, nameConnMap, transactionType
 
Fields inherited from interface com.scooterframework.transaction.Transaction
CMT_TRANSACTION_TYPE, JDBC_TRANSACTION_TYPE, JTA_TRANSACTION_TYPE, USER_TRANSACTION_JNDI_STRING
 
Constructor Summary
JtaTransaction()
          Initialize JtaTransaction
JtaTransaction(javax.transaction.UserTransaction ut)
          Initialize JtaTransaction by injecting an UserTransaction instance.
 
Method Summary
 void begin()
          Start a transaction.
 void commit()
          Commit a transaction.
 void rollback()
          Rollback a transaction.
 
Methods inherited from class com.scooterframework.transaction.AbstractTransactionImpl
getConnection, getConnection, getConnection, getTransactionType, isAllResourcesReleased, isTransactionEnded, isTransactionStarted, releaseResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JtaTransaction

public JtaTransaction()
Initialize JtaTransaction


JtaTransaction

public JtaTransaction(javax.transaction.UserTransaction ut)
Initialize JtaTransaction by injecting an UserTransaction instance.

Method Detail

begin

public void begin()
Start a transaction.

Specified by:
begin in interface Transaction
Overrides:
begin in class AbstractTransactionImpl

commit

public void commit()
Commit a transaction. This is the end of the transaction. This method also commits all JdbcConnections. All resources are released. When this method completes, the thread is no longer associated with a transaction.

Specified by:
commit in interface Transaction
Overrides:
commit in class AbstractTransactionImpl

rollback

public void rollback()
Rollback a transaction. This method also rollback all JdbcConnections. All resources are released. When this method completes, the thread is no longer associated with a transaction.

Specified by:
rollback in interface Transaction
Overrides:
rollback in class AbstractTransactionImpl