Package org.datanucleus.transaction.jta
Class JTAJCATransactionImpl
- java.lang.Object
-
- org.datanucleus.transaction.TransactionImpl
-
- org.datanucleus.transaction.jta.JTAJCATransactionImpl
-
- All Implemented Interfaces:
javax.transaction.Synchronization
,Transaction
public class JTAJCATransactionImpl extends TransactionImpl implements javax.transaction.Synchronization
A transaction that is synchronised with a Java Transaction Service (JTA) transaction with JCA. It is only used when using the JDO API within a JavaEE environment using the JCA adapter (i.e not for JPA).
-
-
Field Summary
-
Fields inherited from class org.datanucleus.transaction.TransactionImpl
active, closed, committing, ec, rollbackOnly, serializeRead, txnMgr
-
Fields inherited from interface org.datanucleus.transaction.Transaction
TRANSACTION_ISOLATION_OPTION
-
-
Constructor Summary
Constructors Constructor Description JTAJCATransactionImpl(ExecutionContext ec, PropertyStore properties)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterCompletion(int status)
Called by the transaction manager after the transaction is committed or rolled back.void
beforeCompletion()
Called by the transaction manager prior to the start of the two-phase transaction commit process.boolean
getIsActive()
Similar to "isActive" except that it just returns the "active" flag whereas the isActive() method can also embody rejoining to underlying transactions.boolean
isActive()
Accessor for whether the transaction is active.-
Methods inherited from class org.datanucleus.transaction.TransactionImpl
addTransactionEventListener, begin, bindTransactionEventListener, close, commit, end, flush, getBeginTime, getNontransactionalRead, getNontransactionalWrite, getNontransactionalWriteAutoCommit, getOptimistic, getOptions, getRestoreValues, getRetainValues, getRollbackOnly, getSerializeRead, getSynchronization, internalBegin, internalCommit, internalPostCommit, internalPreCommit, internalPreRollback, internalRollback, isCommitting, preFlush, releaseSavepoint, removeTransactionEventListener, rollback, rollbackToSavepoint, setNontransactionalRead, setNontransactionalWrite, setNontransactionalWriteAutoCommit, setOptimistic, setOption, setOption, setOption, setOption, setProperties, setRestoreValues, setRetainValues, setRollbackOnly, setSavepoint, setSerializeRead, setSynchronization
-
-
-
-
Constructor Detail
-
JTAJCATransactionImpl
public JTAJCATransactionImpl(ExecutionContext ec, PropertyStore properties)
Constructor.- Parameters:
ec
- ExecutionContextproperties
- Properties to use with the transaction
-
-
Method Detail
-
getIsActive
public boolean getIsActive()
Description copied from class:TransactionImpl
Similar to "isActive" except that it just returns the "active" flag whereas the isActive() method can also embody rejoining to underlying transactions.- Specified by:
getIsActive
in interfaceTransaction
- Overrides:
getIsActive
in classTransactionImpl
- Returns:
- The "active" flag
-
isActive
public boolean isActive()
Accessor for whether the transaction is active.- Specified by:
isActive
in interfaceTransaction
- Overrides:
isActive
in classTransactionImpl
- Returns:
- Whether the transaction is active.
-
beforeCompletion
public void beforeCompletion()
Called by the transaction manager prior to the start of the two-phase transaction commit process.- Specified by:
beforeCompletion
in interfacejavax.transaction.Synchronization
-
afterCompletion
public void afterCompletion(int status)
Called by the transaction manager after the transaction is committed or rolled back. Must be synchronised because some callers expect to be owner of this object's monitor (internalPostCommit() calls closeSQLConnection() which calls notifyAll()).- Specified by:
afterCompletion
in interfacejavax.transaction.Synchronization
- Parameters:
status
- The status
-
-