Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Complete
-
2.2 RC1
Description
For reproducing:
<jdbc:embedded-database id="dataSource" type="H2"/> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <int:inbound-channel-adapter id="inboundAdapter" channel="testChannel" expression="'fghfghfg'"> <int:poller fixed-rate="1000"> <int:transactional/> </int:poller> </int:inbound-channel-adapter> <int:logging-channel-adapter id="testChannel" level="FATAL"/>
Run it just like this:
public static void main(String[] args) { new ClassPathXmlApplicationContext("TransactionSyncBug-context.xml", TransactionSyncBug.class); }
The real issue is here SourcePollingChannelAdapter#doPoll():
The code
TransactionSynchronizationManager.bindResource(source, holder);
should be moved into if (transactionSynchronizationFactory != null) block
The similar issue is in the ImapIdleChannelAdapter