Class EntityTransactionWrapper

java.lang.Object
org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl
org.eclipse.persistence.internal.jpa.transaction.EntityTransactionWrapper
All Implemented Interfaces:
TransactionWrapper

public class EntityTransactionWrapper extends TransactionWrapperImpl implements TransactionWrapper
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:
  • Field Details

  • Constructor Details

    • EntityTransactionWrapper

      public EntityTransactionWrapper(EntityManagerImpl entityManager)
  • Method Details

    • checkForTransaction

      public Object checkForTransaction(boolean validateExistence)
      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.
      Specified by:
      checkForTransaction in class TransactionWrapperImpl
    • getEntityManager

      public EntityManagerImpl getEntityManager()
    • getTransaction

      public EntityTransaction getTransaction()
      Lazy initialize the EntityTransaction. There can only be one EntityTransaction at a time.
      Specified by:
      getTransaction in interface TransactionWrapper
    • isJoinedToTransaction

      public boolean isJoinedToTransaction(UnitOfWorkImpl uow)
      Specified by:
      isJoinedToTransaction in class TransactionWrapperImpl
    • setRollbackOnlyInternal

      public void 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
      Specified by:
      setRollbackOnlyInternal in class TransactionWrapperImpl
    • throwCheckTransactionFailedException

      protected void throwCheckTransactionFailedException()
    • registerIfRequired

      public void registerIfRequired(UnitOfWorkImpl uow)
      Specified by:
      registerIfRequired in class TransactionWrapperImpl