2013-12-14 32 views
2

我有2個問題,WSO2與交易相關的調解員讀取之後的幾個問題,在這麼喜歡:在WSO2使用事務調解員克隆調解

  1. How to Manage Transaction across sequences in WSO2 ESB
  2. WSO2 ESB Distributed Transations
  3. In WSO2 ESB 4.7.0 can we do JMS rollback in receiving sequence?

我的問題:

  1. 我可以使用事務來支持克隆介體嗎?就像我克隆消息併發送到多個序列一樣,如果某個序列產生錯誤,我會進行回滾?

  2. 我看到的與交易中介相關的所有wso2樣本都使用dbreport中介,並且在此中介中,我可以指定「useTransaction =」true「」,我可以對另一箇中介做同樣的事情嗎?

例如,在問題1:

<?xml version="1.0" encoding="UTF-8"?> 
<proxy xmlns="http://ws.apache.org/ns/synapse" 
     name="proxy1" 
     transports="https,http" 
     statistics="enable" 
     trace="enable" 
     startOnLoad="true"> 
    <target> 
     <inSequence onError="conf:/secuencias/rollbackSequence"> 
     <transaction action="new"/> 
     <clone sequential="true"> 
      <target sequence="anon"> 
       <sequence> 
        <payloadFactory media-type="xml"> 
        .... 
        </payloadFactory> 
        <send> 
        <endpoint> 
         <address uri="..."/> 
        </endpoint> 
        </send> 
       </sequence> 
      </target> 
      <target sequence="anon"> 
       <sequence> 
        <payloadFactory media-type="xml"> 
        .... 
        </payloadFactory> 
        <send> 
        <endpoint> 
         <address uri="..."/> 
        </endpoint> 
        </send> 
       </sequence> 
      </target> 
      <target sequence="anon"> 
       <sequence> 
        <payloadFactory media-type="xml"> 
        .... 
        </payloadFactory> 
        <send> 
        <endpoint> 
         <address uri="..."/> 
        </endpoint> 
        </send> 
       </sequence> 
      </target> 
     </clone> 
     <transaction action="commit"/> 
     </inSequence> 
     <outSequence> 
     <aggregate> 
      <completeCondition timeout="5"> 
       <messageCount min="3" max="3"/> 
      </completeCondition> 
      <onComplete xmlns:ns="http://org.apache.synapse/xsd" 
         xmlns:p="http://sistema1.empresa1.com" 
         expression="//p:GeneratedKeys/Entry/ID"> 
       <payloadFactory media-type="xml"> 
        .... 
       </payloadFactory> 
       <send/> 
      </onComplete> 
     </aggregate> 
     </outSequence> 
     <faultSequence> 
     <transaction action="rollback"/> 
     <send/> 
     </faultSequence> 
    </target> 
    <publishWSDL key="conf:/wsdls/....wsdl"/> 
    <description/> 
</proxy> 
+0

Jorge,你有沒有想過這件事?我們在開發跨越多個代理和序列的解決方案時也遇到了同樣的交易問題。 – Voicu

回答

0
  1. 不幸的是當前實現WSO2 ESB不支持使用事務調解員調解的克隆。

  2. 當前wso2 esb與事務仲裁者一起使用以與dbreport仲裁者一起使用,在那裏您可以使用「useTransaction =」true「,除此之外,您可以將事務與事務仲裁者用於JMS消費者/生產者場景