久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <i id='rK3xh'><tr id='rK3xh'><dt id='rK3xh'><q id='rK3xh'><span id='rK3xh'><b id='rK3xh'><form id='rK3xh'><ins id='rK3xh'></ins><ul id='rK3xh'></ul><sub id='rK3xh'></sub></form><legend id='rK3xh'></legend><bdo id='rK3xh'><pre id='rK3xh'><center id='rK3xh'></center></pre></bdo></b><th id='rK3xh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rK3xh'><tfoot id='rK3xh'></tfoot><dl id='rK3xh'><fieldset id='rK3xh'></fieldset></dl></div>
    <tfoot id='rK3xh'></tfoot>

    1. <small id='rK3xh'></small><noframes id='rK3xh'>

    2. <legend id='rK3xh'><style id='rK3xh'><dir id='rK3xh'><q id='rK3xh'></q></dir></style></legend>

        <bdo id='rK3xh'></bdo><ul id='rK3xh'></ul>
    3. 以 IBM MQ 和 Oracle 為資源的獨立 Spring 應用程序

      Standalone spring app XA transactions with IBM MQ and Oracle as resources(以 IBM MQ 和 Oracle 為資源的獨立 Spring 應用程序 XA 事務)

      <small id='2wGDF'></small><noframes id='2wGDF'>

      <i id='2wGDF'><tr id='2wGDF'><dt id='2wGDF'><q id='2wGDF'><span id='2wGDF'><b id='2wGDF'><form id='2wGDF'><ins id='2wGDF'></ins><ul id='2wGDF'></ul><sub id='2wGDF'></sub></form><legend id='2wGDF'></legend><bdo id='2wGDF'><pre id='2wGDF'><center id='2wGDF'></center></pre></bdo></b><th id='2wGDF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2wGDF'><tfoot id='2wGDF'></tfoot><dl id='2wGDF'><fieldset id='2wGDF'></fieldset></dl></div>
        <bdo id='2wGDF'></bdo><ul id='2wGDF'></ul>

      • <tfoot id='2wGDF'></tfoot>

        <legend id='2wGDF'><style id='2wGDF'><dir id='2wGDF'><q id='2wGDF'></q></dir></style></legend>
            <tbody id='2wGDF'></tbody>
              1. 本文介紹了以 IBM MQ 和 Oracle 為資源的獨立 Spring 應用程序 XA 事務的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在開發一個獨立的 Apache camel 應用程序(不在 J2EE 容器上運行).此應用程序需要能夠在分布式事務中將消息從 IBM MQ 隊列管理器路由到 Oracle 數據庫.我的谷歌搜索幾乎把我帶到了幾個地方,但沒有一個能給我一些關于如何把所有東西放在一起的好線索.下面的這個鏈接是最接近我需要的,但不幸的是它不夠清晰,無法讓我走上正確的道路.

                I am in the process of developing a stand alone Apache camel application (not running on a J2EE container). This apps needs to be capable of routing messages from an IBM MQ queue manager to an Oracle database in a distributed transaction. My google searches pretty much took me to a few places but none of those were able to give me some good clues about how to put everything together. This link below was the closest to what I need but unfortunately it is not cler enough to put me on the right path.

                IBM MQManager 作為 XA 事務使用 Spring-jms 和 Spring-tx 的經理

                預先感謝您的意見.

                推薦答案

                您將需要使用 JTA TransactionManager,但由于不在 j2ee 容器中,我建議使用 Atomikos.

                You will need to use a JTA TransactionManager, but since not being in a j2ee container i would sugest to use Atomikos.

                https://github.com/camelinaction/camelinaction/tree/master/第9章/xa

                我的路線是使用 IBM MQ -> Oracle 數據庫,在 J2EE 中是的,但仍然應該使用 Atomikos 設置.我會說這不是正確的方法,但這是我設法讓它工作的唯一方法 - 對于我的用例來說工作得很好.

                My route which is working with IBM MQ -> Oracle Database, in an J2EE yes but still should be working with Atomikos setup. I would say this isn't the proper way to to it, but it's the only way I managed to get it working - working well enough for my use case.

                from(inQueue)
                    .transacted()
                    .setHeader("storeData", constant(false))
                    .to("direct:a")
                    .choice().when(header("storeData").isEqualTo(false)) // if this is true the database calls are 'successful'
                    .log("Sending message to errorQueue")
                    .to(errorQueue)
                ;
                
                StoreDataBean storeDataBean = new StoreDataBean();
                from("direct:a")
                    .onException(Exception.class).handled(false).log("Rollbacking database changes").markRollbackOnlyLast().end()
                    .transacted("PROPAGATION_REQUIRES_NEW")
                    .bean(storeDataBean) //storeData sets the header storeData to true if no SQLException or other exceptions are thrown
                    .end()
                ;
                

                提交是由事務管理器處理的,所以如果我真的收到數據庫提交錯誤,它應該回滾消息.我在回滾消息方面遇到的下一個問題是我無法像使用 ActiveMQ 一樣設置 deadLetterQueue.所以它回滾到傳入隊列.因此,我實際上像我一樣處理數據庫事務,它在一個新事務中,如果調用數據庫時出現正常的 SQLException,則回滾該事務.

                The commit are handled by the transaction manager, so if I actually get an error with the database commit, it should rollback the message. Next problem that I have had with rollbacking messages is that I can't set the deadLetterQueue, as you can with ActiveMQ. So it rolls back to the incoming queue. Therefore I actually handle the database transaction as I do, it is in a new transaction, which is rollbacked in case of a normal SQLException when calling the database.

                我希望這有效:

                from(inQueue)
                    .onException(Exception.class).to(errorQueue).markRollbackOnly().end()
                    .bean(storeDataBean)
                    .end()
                

                我已在社區論壇上發布了有關此內容的帖子,但根本沒有任何答案.

                I have posted about this in the community forums but no answers at all.

                這篇關于以 IBM MQ 和 Oracle 為資源的獨立 Spring 應用程序 XA 事務的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Apache Nifi How to load JSON with nested array JSON and Call Oracle Stored Procedure(Apache Nifi 如何使用嵌套數組 JSON 加載 JSON 并調用 Oracle 存儲過程)
                Why Kafka jdbc connect insert data as BLOB instead of varchar(為什么 Kafka jdbc 將插入數據作為 BLOB 而不是 varchar 連接)
                How to sink kafka topic to oracle using kafka connect?(如何使用kafka connect將kafka主題下沉到oracle?)
                Why Kafka jdbc connect insert data as BLOB instead of varchar(為什么 Kafka jdbc 將插入數據作為 BLOB 而不是 varchar 連接)
                Oracle replication data using Apache kafka(Oracle 使用 Apache kafka 復制數據)
                How to integrate Oracle and Kafka(如何集成 Oracle 和 Kafka)
                1. <small id='qKZWV'></small><noframes id='qKZWV'>

                  • <bdo id='qKZWV'></bdo><ul id='qKZWV'></ul>

                        <tbody id='qKZWV'></tbody>

                        <i id='qKZWV'><tr id='qKZWV'><dt id='qKZWV'><q id='qKZWV'><span id='qKZWV'><b id='qKZWV'><form id='qKZWV'><ins id='qKZWV'></ins><ul id='qKZWV'></ul><sub id='qKZWV'></sub></form><legend id='qKZWV'></legend><bdo id='qKZWV'><pre id='qKZWV'><center id='qKZWV'></center></pre></bdo></b><th id='qKZWV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qKZWV'><tfoot id='qKZWV'></tfoot><dl id='qKZWV'><fieldset id='qKZWV'></fieldset></dl></div>
                        <tfoot id='qKZWV'></tfoot>
                        <legend id='qKZWV'><style id='qKZWV'><dir id='qKZWV'><q id='qKZWV'></q></dir></style></legend>
                        • 主站蜘蛛池模板: 99久久婷婷 | 色综合久久久久 | 九九久久精品视频 | 中文字幕成人在线 | 久久精品视频免费看 | 国产亚洲精品久久久优势 | 欧美一区在线视频 | 欧美福利视频 | 亚洲人va欧美va人人爽 | 亚洲性视频网站 | 黄色大片在线 | 国产精品久久久久久久免费观看 | 在线国产小视频 | 日韩中文字幕在线播放 | 欧美欧美欧美 | 欧美四虎 | 久久蜜桃资源一区二区老牛 | 亚洲精品视频一区 | 免费在线观看av网址 | 日韩中文一区二区三区 | 国户精品久久久久久久久久久不卡 | 国内精品久久久久久影视8 最新黄色在线观看 | 久久99精品久久久久蜜桃tv | 免费h在线 | 日韩欧美精品 | 亚洲va国产日韩欧美精品色婷婷 | 俺去俺来也www色官网cms | 中文字幕一区二区三区四区五区 | 亚洲嫩草 | 欧美一级免费片 | 色综合天天天天做夜夜夜夜做 | 欧美一级黄色网 | 国产精品久久视频 | 国产精品久久性 | av免费电影在线 | 九九九久久国产免费 | 亚洲欧美一区二区三区在线 | 午夜精品久久久久久久久久久久久 | 酒色成人网| 久久精品中文字幕 | 91精品国产综合久久久密闭 |