We have a file poller flow bounded by pseudoTransactionManager
to move / delete the input file at the end of the processing based on success or failure. While this huge file is processed, we would want to update the processing stats in DB in-between the flow multiple times, however the Jpa
update is NOT committed as it is part of the file's transaction scope.
我们有一个由PassoTransactionManager限定的文件轮询器流,用于在处理结束时根据成功或失败移动/删除输入文件。在处理这个大文件时,我们希望在流之间的DB中多次更新处理统计信息,但是JPA更新并未提交,因为它是文件事务范围的一部分。
How do we define a separate independent transaction scope for the Jpa.updatingGateway
? Thanks
我们如何为Jpa.updatingGateway定义单独的独立事务范围?谢谢
.handle(Jpa.updatingGateway(entityManagerFactory)
.entityClass(SomeDAO.class)
.flush(true),
ConsumerEndpointSpec::transactional)
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!