/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@code PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for * the {@code pollingTask}. * @return the spec. */ public PollerSpec transactional() { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder().build(); this.componentsToRegister.put(transactionInterceptor, null); return transactional(transactionInterceptor); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@code PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for the * downstream flow. * @return the spec. */ public ImapIdleChannelAdapterSpec transactional() { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder(false).build(); this.componentsToRegister.put(transactionInterceptor, null); return transactional(transactionInterceptor); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@link PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for * the * {@link org.springframework.messaging.MessageHandler}. * @return the spec. * @since 5.0.8 */ public DelayerEndpointSpec transactionalRelease() { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder().build(); this.componentsToRegister.put(transactionInterceptor, null); return delayedAdvice(transactionInterceptor); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@code PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@link MessageHandler}. * @param handleMessageAdvice the flag to indicate the target {@link Advice} type: * {@code false} - regular {@link TransactionInterceptor}; {@code true} - * {@link org.springframework.integration.transaction.TransactionHandleMessageAdvice} * extension. * @return the spec. */ public S transactional(boolean handleMessageAdvice) { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder(handleMessageAdvice).build(); this.componentsToRegister.put(transactionInterceptor, null); return transactional(transactionInterceptor); }
@Bean public TransactionInterceptor transactionInterceptor() { return new TransactionInterceptorBuilder(true) .build(); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the * provided {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@code pollingTask}. * @param transactionManager the {@link PlatformTransactionManager} to use. * @return the spec. */ public PollerSpec transactional(PlatformTransactionManager transactionManager) { return transactional(new TransactionInterceptorBuilder() .transactionManager(transactionManager) .build()); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the provided * {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the downstream flow. * @param transactionManager the {@link PlatformTransactionManager} to use. * @return the spec. */ public ImapIdleChannelAdapterSpec transactional(PlatformTransactionManager transactionManager) { return transactional(new TransactionInterceptorBuilder(false) .transactionManager(transactionManager) .build()); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the provided * {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@link org.springframework.messaging.MessageHandler}. * @param transactionManager the {@link PlatformTransactionManager} to use. * @return the spec. * @since 5.0.8 */ public DelayerEndpointSpec transactionalRelease(PlatformTransactionManager transactionManager) { return transactionalRelease( new TransactionInterceptorBuilder() .transactionManager(transactionManager) .build()); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the provided * {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@link MessageHandler}. * @param transactionManager the {@link PlatformTransactionManager} to use. * @param handleMessageAdvice the flag to indicate the target {@link Advice} type: * {@code false} - regular {@link TransactionInterceptor}; {@code true} - * {@link org.springframework.integration.transaction.TransactionHandleMessageAdvice} * extension. * @return the spec. */ public S transactional(PlatformTransactionManager transactionManager, boolean handleMessageAdvice) { return transactional(new TransactionInterceptorBuilder(handleMessageAdvice) .transactionManager(transactionManager) .build()); }
@Bean public TransactionInterceptor interceptor2() { return new TransactionInterceptorBuilder() .propagation(Propagation.REQUIRES_NEW) .isolation(Isolation.SERIALIZABLE) .timeout(42) .readOnly(true) .build(); }
@Bean public TransactionInterceptor interceptor1(PlatformTransactionManager transactionManager) { return new TransactionInterceptorBuilder() .propagation(Propagation.REQUIRES_NEW) .isolation(Isolation.SERIALIZABLE) .timeout(42) .readOnly(true) .transactionManager(transactionManager) .build(); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@code PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for the * downstream flow. * @return the spec. */ public ImapIdleChannelAdapterSpec transactional() { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder(false).build(); this.componentsToRegister.put(transactionInterceptor, null); return transactional(transactionInterceptor); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@code PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for * the {@code pollingTask}. * @return the spec. */ public PollerSpec transactional() { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder().build(); this.componentsToRegister.put(transactionInterceptor, null); return transactional(transactionInterceptor); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@link PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for * the * {@link org.springframework.messaging.MessageHandler}. * @return the spec. * @since 5.0.8 */ public DelayerEndpointSpec transactionalRelease() { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder().build(); this.componentsToRegister.put(transactionInterceptor, null); return delayedAdvice(transactionInterceptor); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with default * {@code PlatformTransactionManager} and * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@link MessageHandler}. * @param handleMessageAdvice the flag to indicate the target {@link Advice} type: * {@code false} - regular {@link TransactionInterceptor}; {@code true} - * {@link org.springframework.integration.transaction.TransactionHandleMessageAdvice} * extension. * @return the spec. */ public S transactional(boolean handleMessageAdvice) { TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder(handleMessageAdvice).build(); this.componentsToRegister.put(transactionInterceptor, null); return transactional(transactionInterceptor); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the * provided {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@code pollingTask}. * @param transactionManager the {@link PlatformTransactionManager} to use. * @return the spec. */ public PollerSpec transactional(PlatformTransactionManager transactionManager) { return transactional(new TransactionInterceptorBuilder() .transactionManager(transactionManager) .build()); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the provided * {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the downstream flow. * @param transactionManager the {@link PlatformTransactionManager} to use. * @return the spec. */ public ImapIdleChannelAdapterSpec transactional(PlatformTransactionManager transactionManager) { return transactional(new TransactionInterceptorBuilder(false) .transactionManager(transactionManager) .build()); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the provided * {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@link org.springframework.messaging.MessageHandler}. * @param transactionManager the {@link PlatformTransactionManager} to use. * @return the spec. * @since 5.0.8 */ public DelayerEndpointSpec transactionalRelease(PlatformTransactionManager transactionManager) { return transactionalRelease( new TransactionInterceptorBuilder() .transactionManager(transactionManager) .build()); }
/** * Specify a {@link TransactionInterceptor} {@link Advice} with the provided * {@code PlatformTransactionManager} and default * {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} * for the {@link MessageHandler}. * @param transactionManager the {@link PlatformTransactionManager} to use. * @param handleMessageAdvice the flag to indicate the target {@link Advice} type: * {@code false} - regular {@link TransactionInterceptor}; {@code true} - * {@link org.springframework.integration.transaction.TransactionHandleMessageAdvice} * extension. * @return the spec. */ public S transactional(PlatformTransactionManager transactionManager, boolean handleMessageAdvice) { return transactional(new TransactionInterceptorBuilder(handleMessageAdvice) .transactionManager(transactionManager) .build()); }