protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this)); return defaultCommandInterceptorsTxRequired; }
@Override public <T> T execute(final Command<T> command) { ProcessApplicationIdentifier processApplicationIdentifier = ProcessApplicationContextImpl.get(); if (processApplicationIdentifier != null) { // clear the identifier so this interceptor does not apply to nested commands ProcessApplicationContextImpl.clear(); try { ProcessApplicationReference reference = getPaReference(processApplicationIdentifier); return Context.executeWithinProcessApplication(new Callable<T>() { @Override public T call() throws Exception { return next.execute(command); } }, reference); } finally { // restore the identifier for subsequent commands ProcessApplicationContextImpl.set(processApplicationIdentifier); } } else { return next.execute(command); } }
@Override public <T> T execute(final Command<T> command) { ProcessApplicationIdentifier processApplicationIdentifier = ProcessApplicationContextImpl.get(); if (processApplicationIdentifier != null) { // clear the identifier so this interceptor does not apply to nested commands ProcessApplicationContextImpl.clear(); try { ProcessApplicationReference reference = getPaReference(processApplicationIdentifier); return Context.executeWithinProcessApplication(new Callable<T>() { @Override public T call() throws Exception { return next.execute(command); } }, reference); } finally { // restore the identifier for subsequent commands ProcessApplicationContextImpl.set(processApplicationIdentifier); } } else { return next.execute(command); } }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this)); return defaultCommandInterceptorsTxRequired; }
@Override public <T> T execute(final Command<T> command) { ProcessApplicationIdentifier processApplicationIdentifier = ProcessApplicationContextImpl.get(); if (processApplicationIdentifier != null) { // clear the identifier so this interceptor does not apply to nested commands ProcessApplicationContextImpl.clear(); try { ProcessApplicationReference reference = getPaReference(processApplicationIdentifier); return Context.executeWithinProcessApplication(new Callable<T>() { @Override public T call() throws Exception { return next.execute(command); } }, reference); } finally { // restore the identifier for subsequent commands ProcessApplicationContextImpl.set(processApplicationIdentifier); } } else { return next.execute(command); } }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true)); return defaultCommandInterceptorsTxRequired; }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true)); return defaultCommandInterceptorsTxRequired; }
@Override protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { List<CommandInterceptor> defaultCommandInterceptorsTxRequiresNew = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequiresNew.add(new LogInterceptor()); defaultCommandInterceptorsTxRequiresNew.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequiresNew.add(new JtaTransactionInterceptor(transactionManager, true)); defaultCommandInterceptorsTxRequiresNew.add(new CommandContextInterceptor(commandContextFactory, this, true)); return defaultCommandInterceptorsTxRequiresNew; }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { List<CommandInterceptor> defaultCommandInterceptorsTxRequiresNew = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequiresNew.add(new LogInterceptor()); defaultCommandInterceptorsTxRequiresNew.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequiresNew.add(new SpringTransactionInterceptor(transactionManager, TransactionTemplate.PROPAGATION_REQUIRES_NEW)); CommandContextInterceptor commandContextInterceptor = new CommandContextInterceptor(commandContextFactory, this, true); defaultCommandInterceptorsTxRequiresNew.add(commandContextInterceptor); return defaultCommandInterceptorsTxRequiresNew; }
@Override protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new JtaTransactionInterceptor(transactionManager, false)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this)); return defaultCommandInterceptorsTxRequired; }
@Override protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { List<CommandInterceptor> defaultCommandInterceptorsTxRequiresNew = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequiresNew.add(new LogInterceptor()); defaultCommandInterceptorsTxRequiresNew.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequiresNew.add(new JtaTransactionInterceptor(transactionManager, true)); defaultCommandInterceptorsTxRequiresNew.add(new CommandContextInterceptor(commandContextFactory, this, true)); return defaultCommandInterceptorsTxRequiresNew; }
@Override protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new JtaTransactionInterceptor(transactionManager, false)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this)); return defaultCommandInterceptorsTxRequired; }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { if (transactionManager==null) { throw new ProcessEngineException("transactionManager is required property for SpringProcessEngineConfiguration, use "+StandaloneProcessEngineConfiguration.class.getName()+" otherwise"); } List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new SpringTransactionInterceptor(transactionManager, TransactionTemplate.PROPAGATION_REQUIRED)); CommandContextInterceptor commandContextInterceptor = new CommandContextInterceptor(commandContextFactory, this); defaultCommandInterceptorsTxRequired.add(commandContextInterceptor); return defaultCommandInterceptorsTxRequired; }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this)); return defaultCommandInterceptorsTxRequired; }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true)); return defaultCommandInterceptorsTxRequired; }
@Override protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew() { List<CommandInterceptor> defaultCommandInterceptorsTxRequiresNew = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequiresNew.add(new LogInterceptor()); defaultCommandInterceptorsTxRequiresNew.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequiresNew.add(new JtaTransactionInterceptor(transactionManager, true)); defaultCommandInterceptorsTxRequiresNew.add(new CommandContextInterceptor(commandContextFactory, this, true)); return defaultCommandInterceptorsTxRequiresNew; }
@Override protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new ProcessApplicationContextInterceptor(this)); defaultCommandInterceptorsTxRequired.add(new JtaTransactionInterceptor(transactionManager, false)); defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this)); return defaultCommandInterceptorsTxRequired; }