2
我有2個問題,WSO2與交易相關的調解員讀取之後的幾個問題,在這麼喜歡:在WSO2使用事務調解員克隆調解
- How to Manage Transaction across sequences in WSO2 ESB
- WSO2 ESB Distributed Transations
- In WSO2 ESB 4.7.0 can we do JMS rollback in receiving sequence?
我的問題:
我可以使用事務來支持克隆介體嗎?就像我克隆消息併發送到多個序列一樣,如果某個序列產生錯誤,我會進行回滾?
我看到的與交易中介相關的所有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>
Jorge,你有沒有想過這件事?我們在開發跨越多個代理和序列的解決方案時也遇到了同樣的交易問題。 – Voicu