public void begin() throws NotSupportedException, SystemException { btm.begin(); getSynchronizations().afterTransactionBegin(); }
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); } }
@Override public void registerSynchronization(Synchronization sync) { Synchronizations synchronizations = getSynchronizations(); if (synchronizations.isAwareOfContainerTransactions()) { synchronizations.registerSynchronization(sync); } else { throw new UnsupportedOperationException("cannot register synchronization with container transaction, use <transaction:ejb-transaction/>"); } }
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.afterTransactionCommit(success); } }
@Override public void registerSynchronization(Synchronization sync) { getSynchronizations().registerSynchronization(sync); }
public void beforeCompletion() { getSynchronizations().beforeTransactionCommit(); }
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 { log.debug("rolling back JTA transaction"); try { delegate.rollback(); } finally { getSynchronizations().afterTransactionRollback(); } }
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.afterTransactionCommit(success); } }
@Override public void registerSynchronization(Synchronization sync) { getSynchronizations().registerSynchronization(sync); }
public void rollback() throws IllegalStateException, SecurityException, SystemException { try { btm.rollback(); } finally { getSynchronizations().afterTransactionCompletion(false); } }
public void rollback() throws IllegalStateException, SecurityException, SystemException { UserTransaction userTransaction = ejbContext.getUserTransaction(); try { userTransaction.rollback(); } finally { getSynchronizations().afterTransactionRollback(); } }
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); } }
@Override public void registerSynchronization(Synchronization sync) { Synchronizations synchronizations = getSynchronizations(); if (synchronizations.isAwareOfContainerTransactions()) { synchronizations.registerSynchronization(sync); } else { throw new UnsupportedOperationException("cannot register synchronization with container transaction, use <transaction:ejb-transaction/>"); } }
public void begin() throws NotSupportedException, SystemException { log.debug("beginning JPA resource-local transaction"); // TODO: translate exceptions that occur into the correct JTA exception try { getDelegate().begin(); getSynchronizations().afterTransactionBegin(); } catch (RuntimeException re) { throw re; } }
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { log.debug("committing Spring transaction"); assertActive(); boolean success = false; Synchronizations synchronizations = getSynchronizations(); synchronizations.beforeTransactionCommit(); try { getPlatformTransactionManagerRequired().commit(currentTransaction); success = true; } finally { currentTransaction = null; synchronizations.afterTransactionCommit(success); } }
@Override public void registerSynchronization(Synchronization sync) { getSynchronizations().registerSynchronization(sync); }
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 { log.debug("rolling back JPA resource-local transaction"); //TODO: translate exceptions that occur into the correct JTA exception assertActive(); javax.persistence.EntityTransaction delegate = getDelegate(); clearEntityManager(); try { delegate.rollback(); } finally { getSynchronizations().afterTransactionRollback(); } }
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); } }