protected void initTransactionContextFactory() { if (transactionContextFactory == null) { transactionContextFactory = new StandaloneTransactionContextFactory(); } }
public TransactionContext openTransactionContext(CommandContext commandContext) { return new StandaloneTransactionContext(commandContext); } }
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); }
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); } }
@Override public boolean isTransactionActive() { try { return super.isTransactionActive() && testTransaction.getStatus() != Status.STATUS_NO_TRANSACTION; } catch (Exception e) { throw new RuntimeException(e); } } }
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); }
protected void initTransactionContextFactory() { if (transactionContextFactory == null) { transactionContextFactory = new StandaloneTransactionContextFactory(); } }
protected void fireTransactionEventAsync(final TransactionState transactionState) { super.fireTransactionEvent(transactionState); }
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); } }
protected void initDbSchemaOperationsCommandContextFactory() { if(dbSchemaOperationsCommandContextFactory == null) { TxContextCommandContextFactory cmdContextFactory = new TxContextCommandContextFactory(); cmdContextFactory.setProcessEngineConfiguration(this); cmdContextFactory.setTransactionContextFactory(new StandaloneTransactionContextFactory()); dbSchemaOperationsCommandContextFactory = cmdContextFactory; } }
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); } }
protected void initDbSchemaOperationsCommandContextFactory() { if(dbSchemaOperationsCommandContextFactory == null) { TxContextCommandContextFactory cmdContextFactory = new TxContextCommandContextFactory(); cmdContextFactory.setProcessEngineConfiguration(this); cmdContextFactory.setTransactionContextFactory(new StandaloneTransactionContextFactory()); dbSchemaOperationsCommandContextFactory = cmdContextFactory; } }
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); }
protected void initTransactionContextFactory() { if (transactionContextFactory == null) { transactionContextFactory = new StandaloneTransactionContextFactory(); } }
protected void initDbSchemaOperationsCommandContextFactory() { if(dbSchemaOperationsCommandContextFactory == null) { TxContextCommandContextFactory cmdContextFactory = new TxContextCommandContextFactory(); cmdContextFactory.setProcessEngineConfiguration(this); cmdContextFactory.setTransactionContextFactory(new StandaloneTransactionContextFactory()); dbSchemaOperationsCommandContextFactory = cmdContextFactory; } }