我们如何在 WSO2DSS 或 WSO2ESB 中回滚事务 [英] How we can ROLLBACK the Transaction in WSO2DSS or WSO2ESB

查看:21
本文介绍了我们如何在 WSO2DSS 或 WSO2ESB 中回滚事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 WSO2dss 和 Wso2 ESB 一次不插入任何表.这些是依赖表,如果一个事务失败,我们如何回滚.我的问题是我正在插入 EMP1、EMP2、EMP3我在 EMP1 和 EMP2 中正确插入的数据在插入 EMP3 时发生错误,我如何使用 WSO2 做到这一点......在 Oracle 中,我们有 NONXAENABLEDS

i am inserting no of tables at a time using WSO2dss and Wso2 ESB . those are dependent tables how we can ROLLBACK if one transaction failed.my issue is i am inserting EMP1,EMP2,EMP3 my data inserted properly in EMP1 and EMP2 error occured in while inserting in EMP3 how i can do this using WSO2 ..in Oracle we has NONXAENABLEDS

<sequence>
                  <payloadFactory>
                     <format>
                        <p:insert_emp2_operation xmlns:p="http://ws.wso2.org/dataservice">
                           <xs:e_device xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:e_device>
                           <xs:e_amount xmlns:xs="http://ws.wso2.org/dataservice">5000</xs:e_amount>
                           <xs:e_no xmlns:xs="http://ws.wso2.org/dataservice">450</xs:e_no>
                        </p:insert_emp2_operation>
                     </format>
                     <args>
                        <arg expression="//e_device/text()"/>
                     </args>
                  </payloadFactory>
                  <send>
                     <endpoint>
                        <address uri="http://192.168.1.201:9764/services/emp2_DataService/" format="soap11"/>
                     </endpoint>
                  </send>
               </sequence>
            </target>

就像在其他一些表中一样我如何回滚这一切

as same like in some other tables How i Can Rollback this all

推荐答案

如果要使用 WSO2 DSS 本身启用带回滚的事务,可以使用以下步骤.如果您的相关表在同一个数据库中,那么您可以在 WSO2 中使用 boxcarring 功能数据服务服务器,您可以在其中启用数据服务创建级别的 boxcarring.如果您的表分布在不同的数据库中,那么您可以使用 分布式事务功能.但是,一旦启用这两个功能,您就需要相应地更改代理服务.您可以查看以下博客有关如何在使用 WSO2 ESB 启用分布式事务/包车时调用数据服务的更多详细信息.

If you want to enable transactions with rollback using WSO2 DSS itself, you can use the following steps. If your related tables are in the same database then you can use boxcarring feature in WSO2 data services server, where you can enable boxcarring at the data service creation level. If your tables are distributed among different databases then you can use distributed transaction feature. However, once you enable both these features you need to change your proxy services accordingly. You can check the following blog for more details on how to call the data service when distributed transaction/ boxcarring is enabled using WSO2 ESB.

这篇关于我们如何在 WSO2DSS 或 WSO2ESB 中回滚事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆