Search in sources :

Example 1 with TransactionInterceptorBuilder

use of org.springframework.integration.transaction.TransactionInterceptorBuilder in project spring-integration by spring-projects.

the class ConsumerEndpointSpec method transactional.

/**
 * Specify a {@link TransactionInterceptor} {@link Advice} with default
 * {@code PlatformTransactionManager} and {@link 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);
}
Also used : TransactionInterceptor(org.springframework.transaction.interceptor.TransactionInterceptor) TransactionInterceptorBuilder(org.springframework.integration.transaction.TransactionInterceptorBuilder)

Example 2 with TransactionInterceptorBuilder

use of org.springframework.integration.transaction.TransactionInterceptorBuilder in project spring-integration by spring-projects.

the class ImapIdleChannelAdapterSpec method transactional.

/**
 * Specify a {@link TransactionInterceptor} {@link Advice} with default
 * {@code PlatformTransactionManager} and {@link 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);
}
Also used : TransactionInterceptor(org.springframework.transaction.interceptor.TransactionInterceptor) TransactionInterceptorBuilder(org.springframework.integration.transaction.TransactionInterceptorBuilder)

Example 3 with TransactionInterceptorBuilder

use of org.springframework.integration.transaction.TransactionInterceptorBuilder in project spring-integration by spring-projects.

the class PollerSpec method transactional.

/**
 * Specify a {@link TransactionInterceptor} {@link Advice} with default {@code PlatformTransactionManager}
 * and {@link DefaultTransactionAttribute} for the {@code pollingTask}.
 * @return the spec.
 */
public PollerSpec transactional() {
    TransactionInterceptor transactionInterceptor = new TransactionInterceptorBuilder().build();
    this.componentsToRegister.put(transactionInterceptor, null);
    return transactional(transactionInterceptor);
}
Also used : TransactionInterceptor(org.springframework.transaction.interceptor.TransactionInterceptor) TransactionInterceptorBuilder(org.springframework.integration.transaction.TransactionInterceptorBuilder)

Aggregations

TransactionInterceptorBuilder (org.springframework.integration.transaction.TransactionInterceptorBuilder)3 TransactionInterceptor (org.springframework.transaction.interceptor.TransactionInterceptor)3