protected Collection< ? extends CommandInterceptor> createDefaultCommandInterceptors(boolean contextReusePossible) { List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); CommandContextInterceptor commandContextInterceptor = new CommandContextInterceptor(commandContextFactory, this); commandContextInterceptor.setContextReusePossible(contextReusePossible); defaultCommandInterceptorsTxRequired.add(commandContextInterceptor); return defaultCommandInterceptorsTxRequired; }
protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() { if (transactionManager==null) { throw new ActivitiException("transactionManager is required property for SpringProcessEngineConfiguration, use "+StandaloneProcessEngineConfiguration.class.getName()+" otherwise"); } List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>(); defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); defaultCommandInterceptorsTxRequired.add(new SpringTransactionInterceptor(transactionManager, TransactionTemplate.PROPAGATION_REQUIRED)); CommandContextInterceptor commandContextInterceptor = new CommandContextInterceptor(commandContextFactory, this); // there is only this change against SpringProcessEngineConfiguration commandContextInterceptor.setContextReusePossible(false); defaultCommandInterceptorsTxRequired.add(commandContextInterceptor); return defaultCommandInterceptorsTxRequired; } }