【发布时间】:2014-06-29 10:27:02
【问题描述】:
我有一个spring-integrationmessage channel,它使用jpa inbound-channel-adapter 从数据库中读取。
<int:channel id="logChannel">
<int:priority-queue capacity="20" />
</int:channel>
<int-jpa:inbound-channel-adapter
channel="logChannel" entity-class="com.objects.Transactionlog"
entity-manager-factory="entityManagerFactory" auto-startup="true"
jpa-query="SELECT x FROM Transactionlog AS x WHERE x.status LIKE '1'" max-results="1">
<int:poller fixed-rate="5000">
<int:transactional propagation="REQUIRED"
transaction-manager="transactionManager" />
</int:poller>
</int-jpa:inbound-channel-adapter>
这始终只读取表transactionlog 的第一行。所以我想在读取后更新每个数据库条目的status。有没有人知道怎么做?
【问题讨论】:
标签: java spring jpa spring-integration