Hello colleagues

I have a simple route 

<camel:camelContext id="upstream-entries">
        <camel:route>
            <camel:from
uri="execMqOet:PWJMQM.GOM.GOMJULINT.DEV2?disableReplyTo=true"/>
            <camel:onCompletion>
                <camel:to "direct:separate_tx_route" />
                <camel:log message="in on completion" />
            </camel:onCompletion>
            <camel:transacted ref="PROPAGATION_REQUIRED"/>
            <camel:to uri="sql:INSERT INTO DISASTER values
(SEQ_TFI_TRADE_STATUS.NEXTVAL, #)?dataSourceRef=xaDataSource"/>
        </camel:route>
    </camel:camelContext>

execMqOet is a transactional jms consumer which starts XA transaction. 
I need to start another transaction in direct:separate_tx_route but it
should be started only if transaction finished in parent route.

After some investigation i've found that onCompletion starts in another
thread (which is fine), when exchange is completed. But this doesn't mean
that transaction in parent route committed as well.

How can i synchronize on completion block with transaction commit in parent
route?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Start-new-route-after-transaction-completed-tp5736661.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to