org.datanucleus
Class JTAJCATransactionImpl

java.lang.Object
  extended by org.datanucleus.TransactionImpl
      extended by org.datanucleus.JTAJCATransactionImpl
All Implemented Interfaces:
javax.transaction.Synchronization, Transaction

public class JTAJCATransactionImpl
extends TransactionImpl
implements javax.transaction.Synchronization

A transaction that is synchronized with a Java Transaction Service (JTA) transaction with JCA. TODO This is revision 984 of JTATransactionImpl that Erik wrote. It should be merged with JTATransactionImpl when Erik and Joerg understand what both are requiring, merge them, and then document them.


Field Summary
 
Fields inherited from class org.datanucleus.TransactionImpl
LOCALISER, nontransactionalRead, nontransactionalWrite, optimistic, restoreValues, retainValues, rollbackOnly, serializeRead
 
Fields inherited from interface org.datanucleus.Transaction
TRANSACTION_ISOLATION_OPTION
 
Method Summary
 void afterCompletion(int status)
          This method is called by the transaction manager after the transaction is committed or rolled back.
 void beforeCompletion()
          The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process.
 boolean isActive()
          Accessor for whether the transaction is active.
 
Methods inherited from class org.datanucleus.TransactionImpl
addTransactionEventListener, begin, commit, end, flush, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getOptions, getRestoreValues, getRetainValues, getRollbackOnly, getSerializeRead, getSynchronization, internalBegin, internalCommit, internalPostCommit, internalPreCommit, internalPreRollback, internalRollback, isCommitting, lockReadObjects, removeTransactionEventListener, rollback, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setOption, setOption, setOption, setRestoreValues, setRetainValues, setRollbackOnly, setSerializeRead, setSynchronization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isActive

public boolean isActive()
Accessor for whether the transaction is active.

Specified by:
isActive in interface Transaction
Overrides:
isActive in class TransactionImpl
Returns:
Whether the transaction is active.

beforeCompletion

public void beforeCompletion()
The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process. This is not called in JCA mode

Specified by:
beforeCompletion in interface javax.transaction.Synchronization

afterCompletion

public void afterCompletion(int status)
This method is called by the transaction manager after the transaction is committed or rolled back. Must be synchronized because some callees expect to be owner of this object's monitor (internalPostCommit() calls closeSQLConnection() which calls notifyAll()). This is not called in JCA mode

Specified by:
afterCompletion in interface javax.transaction.Synchronization
Parameters:
status - The status


Copyright © 2010. All Rights Reserved.