@Override public void setRollbackOnly() { transaction.setRollbackOnly(); }
public void setRollbackOnly() { EntityTransaction tx = getEntityManagerHolder().getEntityManager().getTransaction(); if (tx.isActive()) { tx.setRollbackOnly(); } if (hasConnectionHolder()) { getConnectionHolder().setRollbackOnly(); } }
public <E> E transactional(Callable<E> action, boolean readOnly) { ensureNotInRollbackOnlyTransation(); EntityTransaction tx = em.getTransaction(); U.notNull(tx, "transaction"); boolean newTx = !tx.isActive(); if (newTx) { tx.begin(); } if (readOnly) { tx.setRollbackOnly(); } try { E result = action.call(); if (newTx) { if (tx.getRollbackOnly()) { tx.rollback(); } else { tx.commit(); } } return result; } catch (Throwable e) { if (newTx) { if (tx.isActive()) { tx.rollback(); } } throw U.rte("Transaction execution error, rolled back!", e); } }
public void setRollbackOnly() { EntityTransaction tx = getEntityManagerHolder().getEntityManager().getTransaction(); if (tx.isActive()) { tx.setRollbackOnly(); } if (hasConnectionHolder()) { getConnectionHolder().setRollbackOnly(); } }
assertTrue(!TransactionSynchronizationManager.isSynchronizationActive()); verify(tx).setRollbackOnly(); verify(tx).rollback(); verify(manager).close();
verify(tx).setRollbackOnly(); verify(manager).close();
@Override public void setRollbackOnly() throws IllegalStateException, SystemException { status = Status.STATUS_MARKED_ROLLBACK; transaction.setRollbackOnly(); }
/** * {@inheritDoc} */ // @Override public void rollback() { txn.setRollbackOnly(); } }
@Override public void markRollbackOnly() { tx.setRollbackOnly(); }
@Override public void doMarkTransactionAsRollbackOnly(EntityTransaction entityTransaction) { entityTransaction.setRollbackOnly(); }
/** * Sets the transaction for rollback */ public void rollback() { em.getTransaction().setRollbackOnly(); }
@Override public void setRollbackOnly() { em.getTransaction().setRollbackOnly(); }
@Override public void setRollbackOnly() { em.getTransaction().setRollbackOnly(); }
@Override public void setRollbackOnly() throws IllegalStateException, SystemException { _em.getTransaction().setRollbackOnly(); }
@Override public void setForRollback() { this.getEntityManager().getTransaction().setRollbackOnly(); }
@Override public void setRollbackOnly() { get().getTransaction().setRollbackOnly(); }
/** * 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 */ public void setRollbackOnlyInternal(){ if (this.getTransaction().isActive()){ this.getTransaction().setRollbackOnly(); } }
/** * 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 */ public void setRollbackOnlyInternal(){ if (this.getTransaction().isActive()){ this.getTransaction().setRollbackOnly(); } }
public void setRollbackOnly() throws IllegalStateException, SystemException { log.debug("marking JPA resource-local transaction for rollback"); getDelegate().setRollbackOnly(); }
public void setRollbackOnly() throws IllegalStateException, SystemException { log.debug("marking JPA resource-local transaction for rollback"); assertActive(); getDelegate().setRollbackOnly(); }