/** * 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 {@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 {@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 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 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()); }