FileDocCategorySizeDatePackage
EntityTransactionWrapper.javaAPI DocGlassfish v2 API3811Tue May 22 16:54:28 BST 2007oracle.toplink.essentials.internal.ejb.cmp3.transaction

EntityTransactionWrapper

public class EntityTransactionWrapper extends EntityTransactionWrapper 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
oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionWrapper

Fields Summary
Constructors Summary
public EntityTransactionWrapper(EntityManagerImpl entityManager)

        super(entityManager);
    
Methods Summary
public javax.persistence.EntityTransactiongetTransaction()
Lazy initialize the EntityTransaction. There can only be one EntityTransaction at a time.

        if (entityTransaction == null){
            entityTransaction = new EntityTransactionImpl(this);
        }
        return (EntityTransaction)entityTransaction;
    
public voidsetRollbackOnlyInternal()
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

        if (this.getTransaction().isActive()){
            this.getTransaction().setRollbackOnly();
        }
    
protected voidthrowCheckTransactionFailedException()

        throw new TransactionRequiredException(TransactionException.transactionNotActive().getMessage());