public void afterCompletion(int status) { boolean success = Status.STATUS_COMMITTED == status; getSynchronizations().afterTransactionCompletion(success); rollbackOnly = false; synchronizationRegistered = false; }
public void rollback() throws IllegalStateException, SecurityException, SystemException { try { btm.rollback(); } finally { getSynchronizations().afterTransactionCompletion(false); } }
public void rollback() throws IllegalStateException, SecurityException, SystemException { log.debug("rolling back JPA resource-local transaction"); // TODO: translate exceptions that occur into the correct JTA exception javax.persistence.EntityTransaction delegate = getDelegate(); try { delegate.rollback(); } finally { getSynchronizations().afterTransactionCompletion(false); } }
public void rollback() throws IllegalStateException, SecurityException, SystemException { UserTransaction userTransaction = ejbContext.getUserTransaction(); try { userTransaction.rollback(); } finally { getSynchronizations().afterTransactionCompletion(false); } }
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { boolean success = false; Synchronizations synchronizations = getSynchronizations(); synchronizations.beforeTransactionCommit(); try { btm.commit(); success = true; } finally { synchronizations.afterTransactionCompletion(success); } }
public void rollback() throws IllegalStateException, SecurityException, SystemException { log.debug("rolling back JTA transaction"); try { delegate.rollback(); } finally { getSynchronizations().afterTransactionCompletion(false); } }
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { log.debug("committing JTA transaction"); boolean success = false; Synchronizations synchronizations = getSynchronizations(); synchronizations.beforeTransactionCommit(); try { delegate.commit(); success = true; } finally { synchronizations.afterTransactionCompletion(success); } }
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { UserTransaction userTransaction = ejbContext.getUserTransaction(); boolean success = false; Synchronizations synchronizations = getSynchronizations(); synchronizations.beforeTransactionCommit(); try { userTransaction.commit(); success = true; } finally { synchronizations.afterTransactionCompletion(success); } }
public void rollback() throws IllegalStateException, SecurityException, SystemException { log.debug("rolling back JPA resource-local transaction"); // TODO: translate exceptions that occur into the correct JTA exception Transaction delegate = getDelegate(); rollbackOnly = false; boolean tempSynchronizationRegistered = synchronizationRegistered; delegate.rollback(); if (!tempSynchronizationRegistered) { getSynchronizations().afterTransactionCompletion(false); } }
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { log.debug("committing JPA resource-local transaction"); javax.persistence.EntityTransaction delegate = getDelegate(); boolean success = false; try { if (delegate.getRollbackOnly()) { delegate.rollback(); throw new RollbackException(); } else { getSynchronizations().beforeTransactionCommit(); delegate.commit(); success = true; } } finally { getSynchronizations().afterTransactionCompletion(success); } }
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { log.debug("committing JPA resource-local transaction"); Transaction delegate = getDelegate(); boolean success = false; boolean tempSynchronizationRegistered = synchronizationRegistered; try { if (delegate.isActive()) { if (!rollbackOnly) { if (!tempSynchronizationRegistered) { // should only occur if the user started the transaction // directly through the session getSynchronizations().beforeTransactionCommit(); } delegate.commit(); success = true; } else { rollback(); } } } finally { if (!tempSynchronizationRegistered) { getSynchronizations().afterTransactionCompletion(success); } } }