本文介绍了Spring集成中的全局事务处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
它是一个 Spring 集成应用程序.我有一个要求,我需要坚持到数据库,然后发布到队列/主题.这应该是单个事务的一部分.我打算使用 JTATransactionManager.应用服务器是Tomcat.有人请提供一些此实现所需的示例配置代码.
Its a Spring Integration application.I have a requirement where I need to persist to DB and then post to Queue/Topic. This should be part of a single transaction. I am planning to use the JTATransactionManager. Application Server is Tomcat. Would someone please provide some sample configuration code required for this implementation.
推荐答案您需要第三方独立的 XA 事务管理器,例如 Atomikos.Tomcat 没有.
You need a third party stand-alone XA transaction manager such as Atomikos. Tomcat doesn't have one.
您也可以考虑 使用成熟的 2pc 的替代方案.
更多推荐
Spring集成中的全局事务处理
发布评论