Class TransactionInterceptorBuilder
java.lang.Object
org.springframework.integration.transaction.TransactionInterceptorBuilder
Provides a fluent API to build a transaction interceptor. See
TransactionAttribute
for property meanings; if a TransactionAttribute
is provided, the individual properties are ignored. If a
TransactionManager
is not provided, a single instance of
TransactionManager
will be discovered at runtime; if you have more
than one transaction manager, you must inject the one you want to use here.
When the handleMessageAdvice
option is in use, this builder produces
TransactionHandleMessageAdvice
instance.
- Since:
- 5.0
- Author:
- Gary Russell, Artem Bilan
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
propagation
(Propagation propagation) readOnly
(boolean readOnly) timeout
(int timeout) transactionAttribute
(TransactionAttribute transactionAttribute) transactionManager
(TransactionManager transactionManager) Provide aTransactionManager
instance to use.
-
Constructor Details
-
TransactionInterceptorBuilder
public TransactionInterceptorBuilder() -
TransactionInterceptorBuilder
public TransactionInterceptorBuilder(boolean handleMessageAdvice)
-
-
Method Details
-
propagation
-
isolation
-
timeout
-
readOnly
-
transactionAttribute
public final TransactionInterceptorBuilder transactionAttribute(TransactionAttribute transactionAttribute) -
transactionManager
Provide aTransactionManager
instance to use.- Parameters:
transactionManager
- theTransactionManager
to use- Returns:
- the builder
-
build
-