i have a transactional poller (spring 3.1.2 and spring-integration 2.2.3) to ensure that messages will be redelivered if the transaction is rolled back by an exception
<int:outbound-channel-adapter id="obca" ref="notificationHandler"
method="handle" channel="notificationChannel" >
<int:poller max-messages-per-poll="100" fixed-delay="6000"
time-unit="MILLISECONDS">
<int:transactional isolation="DEFAULT" />
</int:poller>
</int:outbound-channel-adapter>
this works fine when unit testing with an H2 database, the message is redelivered as long as the method throws an exception
@Transactional
public void handle(Message<MyPayload> message)
but when i use the sql-server we use in production (ms-sqlserver, which uses READ COMMITTED SNAPSHOT as isolation level if that is important) the redelivery on exception does not work. any hints why this may be?
EDIT:
i tested with TRACE logging but couldn't find suspicious log messages, finally i got it to work. i declared a separate dataSource(same config as normal database) and transactionManager org.springframework.jdbc.datasource.DataSourceTransactionManager instead of my normal org.springframework.orm.jpa.JpaTransactionManager.