public void commit() { LOG.debugTransactionOperation("firing event committing..."); fireTransactionEvent(TransactionState.COMMITTING); LOG.debugTransactionOperation("committing the persistence session..."); getPersistenceProvider().commit(); LOG.debugTransactionOperation("firing event committed..."); fireTransactionEvent(TransactionState.COMMITTED); }
public TransactionContext openTransactionContext(CommandContext commandContext) { return new StandaloneTransactionContext(commandContext); } }
protected void fireTransactionEvent(TransactionState transactionState) { this.setLastTransactionState(transactionState); if (stateTransactionListeners==null) { return; } List<TransactionListener> transactionListeners = stateTransactionListeners.get(transactionState); if (transactionListeners==null) { return; } for (TransactionListener transactionListener: transactionListeners) { transactionListener.execute(commandContext); } }
protected void fireTransactionEventAsync(final TransactionState transactionState) { super.fireTransactionEvent(transactionState); }
@Override public boolean isTransactionActive() { try { return super.isTransactionActive() && testTransaction.getStatus() != Status.STATUS_NO_TRANSACTION; } catch (Exception e) { throw new RuntimeException(e); } } }
@Override public void commit() { logger.trace("********* Commit context for {}", Thread.currentThread().getName()); super.commit(); try { new SimulatedTransactionManager().pop(); } catch (Exception e) { throw new RuntimeException(e); } }
@Override public void rollback() { logger.trace("******* Rollback context for {}", Thread.currentThread().getName()); super.rollback(); try { new SimulatedTransactionManager().setRollbackOnly(false); new SimulatedTransactionManager().pop(); } catch (Exception e) { throw new RuntimeException(e); } }
protected void fireTransactionEventAsync(final TransactionState transactionState) { super.fireTransactionEvent(transactionState); }
public void commit() { LOG.debugTransactionOperation("firing event committing..."); fireTransactionEvent(TransactionState.COMMITTING); LOG.debugTransactionOperation("committing the persistence session..."); getPersistenceProvider().commit(); LOG.debugTransactionOperation("firing event committed..."); fireTransactionEvent(TransactionState.COMMITTED); }
public TransactionContext openTransactionContext(CommandContext commandContext) { return new StandaloneTransactionContext(commandContext); } }
protected void fireTransactionEvent(TransactionState transactionState) { this.setLastTransactionState(transactionState); if (stateTransactionListeners==null) { return; } List<TransactionListener> transactionListeners = stateTransactionListeners.get(transactionState); if (transactionListeners==null) { return; } for (TransactionListener transactionListener: transactionListeners) { transactionListener.execute(commandContext); } }
public void rollback() { try { try { LOG.debugTransactionOperation("firing event rollback..."); fireTransactionEvent(TransactionState.ROLLINGBACK); } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugTransactionOperation("rolling back the persistence session..."); getPersistenceProvider().rollback(); } } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugFiringEventRolledBack(); fireTransactionEvent(TransactionState.ROLLED_BACK); } }
public TransactionContext openTransactionContext(CommandContext commandContext) { return new StandaloneTransactionContext(commandContext); } }
protected void fireTransactionEvent(TransactionState transactionState) { this.setLastTransactionState(transactionState); if (stateTransactionListeners==null) { return; } List<TransactionListener> transactionListeners = stateTransactionListeners.get(transactionState); if (transactionListeners==null) { return; } for (TransactionListener transactionListener: transactionListeners) { transactionListener.execute(commandContext); } }
public void rollback() { try { try { LOG.debugTransactionOperation("firing event rollback..."); fireTransactionEvent(TransactionState.ROLLINGBACK); } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugTransactionOperation("rolling back the persistence session..."); getPersistenceProvider().rollback(); } } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugFiringEventRolledBack(); fireTransactionEvent(TransactionState.ROLLED_BACK); } }
public void commit() { LOG.debugTransactionOperation("firing event committing..."); fireTransactionEvent(TransactionState.COMMITTING); LOG.debugTransactionOperation("committing the persistence session..."); getPersistenceProvider().commit(); LOG.debugTransactionOperation("firing event committed..."); fireTransactionEvent(TransactionState.COMMITTED); }
public void rollback() { try { try { LOG.debugTransactionOperation("firing event rollback..."); fireTransactionEvent(TransactionState.ROLLINGBACK); } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugTransactionOperation("rolling back the persistence session..."); getPersistenceProvider().rollback(); } } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugFiringEventRolledBack(); fireTransactionEvent(TransactionState.ROLLED_BACK); } }