Hi,
I have a question about Transactions in Spring integration.
Let's assume the following case.
<integrationublish-subscribe-channel id="exportChannel"
task-executor="pool2"/>
<task:executor id="pool2" pool-size="5"/>
<!-- #######################EXPORT TRANSFORMER L########################################### -->
<integration:chain input-channel="exportChannel" output-channel="transformedChannel">
<integration:service-activator
ref="exportService"
method="process"/>
<!-- #######################EXPORT TRANSFORMER L########################################### -->
<integration:transformer ref="exportTransformer"
method="transform"/>
</integration:chain>
..................
both method process and transform are mark as
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, readOnly = false, rollbackFor = Throwable.class)
The object returned by method process is the parameter in the method transform.
I need that object to be attached to persisten context/session (to avoid lazy loading exceptions in the method transform).
I want to know if Spring integration creates internally a transaction when the message is dispatched asynchronously by the executor, therefore the transactions in both methods join the main one or on the other hand I need to define someting else in the application context.
Cheers


ublish-subscribe-channel id="exportChannel"
Reply With Quote