Module org.eclipse.persistence.jpa
Class EntityTransactionWrapper
java.lang.Object
org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl
org.eclipse.persistence.internal.jpa.transaction.EntityTransactionWrapper
- All Implemented Interfaces:
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 Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl
entityManager, localUOW, txnKey
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncheckForTransaction
(boolean validateExistence) INTERNAL: This method will be used to check for a transaction and throws exception if none exists.Lazy initialize the EntityTransaction.boolean
void
void
Mark the current transaction so that the only possible outcome of the transaction is for the transaction to be rolled back.protected void
Methods inherited from class org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl
clear, getLocalUnitOfWork, setLocalUnitOfWork
-
Field Details
-
entityTransaction
-
-
Constructor Details
-
EntityTransactionWrapper
-
-
Method Details
-
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.- Specified by:
checkForTransaction
in classTransactionWrapperImpl
-
getEntityManager
-
getTransaction
Lazy initialize the EntityTransaction. There can only be one EntityTransaction at a time.- Specified by:
getTransaction
in interfaceTransactionWrapper
-
isJoinedToTransaction
- Specified by:
isJoinedToTransaction
in classTransactionWrapperImpl
-
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 classTransactionWrapperImpl
-
throwCheckTransactionFailedException
protected void throwCheckTransactionFailedException() -
registerIfRequired
- Specified by:
registerIfRequired
in classTransactionWrapperImpl
-