[英]Apache Camel: how to do an XA Transactional Manager in a route with an FTP-endpoint and database write access in it?
This is the route:这是路线:
from(jms:queue:xxx)
...
.process(_write_in_db_)
...
.to(ftp:yyy)
I think I need a global XA Transactional Manager that covers the whole route and commits the changes in DB and Queue only after global commit.我想我需要一个覆盖整个路由的全局XA 事务管理器,并且只有在全局提交之后才提交数据库和队列中的更改。
Unfortunatly I didn't found any examples for that case and would appriciate if anybody could say how to do it.不幸的是,我没有找到该案例的任何示例,如果有人能说出如何去做,我会很感激。
There is a excellent example @ https://github.com/FuseByExample/esb-transactions .有一个很好的例子@ https://github.com/FuseByExample/esb-transactions 。 I have personally used this example as starting point and it works perfectly.
我个人使用这个例子作为起点,它完美地工作。
In studying this example you will learn:
在学习这个例子时,你将学到:
How to set up an XA-aware DataSource
如何设置 XA 感知数据源
How to configure a JPA persistence unit
如何配置 JPA 持久化单元
How to leverage Fuse ESB's JTA and JPA support in your routes
如何在路由中利用 Fuse ESB 的 JTA 和 JPA 支持
How to configure a JMS component to support XA
如何配置 JMS 组件以支持 XA
How to define a transactional route
如何定义事务路由
How to configure a ResourceManager that can recover XA transactions after a crash
如何配置可以在崩溃后恢复 XA 事务的 ResourceManager
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.