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

public Class EntityTransactionWrapper

extends TransactionWrapperImpl
implements TransactionWrapper
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.jpa.transaction.TransactionWrapper
Imports
jakarta.persistence.EntityTransaction, .TransactionRequiredException, org.eclipse.persistence.internal.jpa.EntityManagerImpl, org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl, org.eclipse.persistence.internal.localization.ExceptionLocalization, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl, org.eclipse.persistence.exceptions.TransactionException

INTERNAL: JDK 1.5 specific version of EntityTransactionWrapper. Differs from the JDK 1.4 version in that it implements a different version of the TransactionWrapper interface, uses a different EntityManager, and returns a different EntityTransaction version.
See Also
org.eclipse.persistence.internal.jpa.transaction.EntityTransactionWrapper

Field Summary

Modifier and TypeField and Description
protected EntityTransactionImpl
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 EntityManagerImpl
public EntityTransaction
public boolean
public void
public void
setRollbackOnlyInternal()

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

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

Field Detail

entityTransactionback to summary
protected EntityTransactionImpl entityTransaction

Constructor Detail

EntityTransactionWrapperback to summary
public EntityTransactionWrapper(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
getEntityManagerback to summary
public EntityManagerImpl getEntityManager()
getTransactionback to summary
public EntityTransaction getTransaction()

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

Lazy initialize the EntityTransaction. There can only be one EntityTransaction at a time.

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.

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()