Spring集成中的全局事务处理

编程入门 行业动态 更新时间:2024-10-28 07:23:11
本文介绍了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集成中的全局事务处理

本文发布于:2023-08-01 20:10:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1271327.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:全局   事务处理   Spring

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!