[英]Using transaction mediator in WSO2 with clone mediator
在閱讀SO中的幾個問題后,我對WSO2有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>
不幸的是,在WSO2的當前實現中,ESB不支持將事務介體與克隆介體一起使用。
當前,wso2 esb與事務調解器一起使用,可以與dbreport調解器一起使用,在那里您可以像正確提到的那樣“ useTransaction =“ true”。除此之外,您只能將事務與調解器一起用於JMS使用者/生產者方案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.