Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.transaction

public Class JTATransactionWrapper

extends TransactionWrapperImpl
implements TransactionWrapper
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.jpa.transaction.TransactionWrapper
Imports
jakarta.persistence.EntityTransaction, .PersistenceException, .TransactionRequiredException, jakarta.transaction.Synchronization, .Transaction, org.eclipse.persistence.internal.jpa.EntityManagerImpl, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl, org.eclipse.persistence.transaction.AbstractTransactionController, org.eclipse.persistence.exceptions.TransactionException

INTERNAL: JTA transaction wrapper. Allows the EntityManager to transparently use JTA vs local transactions.

Field Summary

Modifier and TypeField and Description
private boolean
protected AbstractTransactionController
Inherited from org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl:
entityManagerlocalUOWtxnKey

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
checkForTransaction(boolean validateExistence)

Implements abstract org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.checkForTransaction.

INTERNAL: This method will be used to check for a transaction and throws exception if none exists.
public void
clear()

Overrides org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.clear.

INTERNAL: Internal clear the underlying data structures that this transaction owns.
public EntityTransaction
getTransaction()

Implements org.eclipse.persistence.internal.jpa.transaction.TransactionWrapper.getTransaction.

An ENtityTransaction cannot be used at the same time as a JTA transaction throw an exception
public boolean
public void
public void
setRollbackOnlyInternal()

Implements abstract org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.setRollbackOnlyInternal.

INTERNAL: Mark the current transaction so that the only possible outcome of the transaction is for the transaction to be rolled back.
protected void
protected void
Inherited from org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl:
getLocalUnitOfWorksetLocalUnitOfWork

Field Detail

isJoinedback to summary
private boolean isJoined
txnControllerback to summary
protected AbstractTransactionController txnController

Constructor Detail

JTATransactionWrapperback to summary
public JTATransactionWrapper(EntityManagerImpl entityManager)

Method Detail

checkForTransactionback to summary
public Object checkForTransaction(boolean validateExistence)

Implements abstract org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.checkForTransaction.

INTERNAL: This method will be used to check for a transaction and throws exception if none exists. If this method returns without exception then a transaction exists. This method must be called before accessing the localUOW.

Annotations
@Override
clearback to summary
public void clear()

Overrides org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.clear.

INTERNAL: Internal clear the underlying data structures that this transaction owns.

Annotations
@Override
getTransactionback to summary
public EntityTransaction getTransaction()

Implements org.eclipse.persistence.internal.jpa.transaction.TransactionWrapper.getTransaction.

An ENtityTransaction cannot be used at the same time as a JTA transaction throw an exception

Annotations
@Override
isJoinedToTransactionback to summary
public boolean isJoinedToTransaction(UnitOfWorkImpl uow)

Implements abstract org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.isJoinedToTransaction.

Annotations
@Override
registerIfRequiredback to summary
public void registerIfRequired(UnitOfWorkImpl uow)

Implements abstract org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.registerIfRequired.

Annotations
@Override
setRollbackOnlyInternalback to summary
public void setRollbackOnlyInternal()

Implements abstract org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl.setRollbackOnlyInternal.

INTERNAL: Mark the current transaction so that the only possible outcome of the transaction is for the transaction to be rolled back. This is an internal method and if the txn is not active will do nothing

Annotations
@Override
throwCheckTransactionFailedExceptionback to summary
protected void throwCheckTransactionFailedException()
throwUserTransactionExceptionback to summary
protected void throwUserTransactionException()