XA transaction with multicast

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XA transaction with multicast

chrajanirao
Hi,

I am trying to make XA transaction work in below example scenario route defined based on spring xml. I am using camel 1.4.

<camel:route errorHandlerRef="transactionErrorHandler">
        <camel:from uri="timer:is3events?period=30000" />
        <camel:policy ref="PROPAGATION_REQUIRED" />
        <camel:setBody>
                <camel:el>
                        select * from events where processed=0 order by id
                </camel:el>
        </camel:setBody>
        <camel:to uri="jdbc:is3DataSource?readSize=1" />
        <camel:multicast>
                <camel:pipeline>
                        <camel:process ref="updateEventProcessor" />
                        <camel:process ref="myEventProcessor" />
                </camel:pipeline>
                <camel:pipeline>
                        <camel:setBody>
                                <camel:el>${in.body[0]['MESSAGE']}</camel:el>
                        </camel:setBody>
                        <camel:to uri="activemq:queue:USERS.xaevents" />
                </camel:pipeline>
        </camel:multicast>
</camel:route>

I have a table called events with id, message and processed columns. I want to read from this table and send messages to activemq queue and update the rows with processed=1 in XA transaction. I have this myEventProcessor as a test processor to throw exception on specific values to simulate failing.

What I noticed is that if we have pipeline with multiple processors under multicast and if one of those processes fail camel says its breaking out of pipeline but it does not rollback the transaction. instead, its continuing with the next pipeline under that multicast. It works fine i.e. rollsback if the pipeline inside the multicast has only one process in it.

Can someone explain me if this scenario is not supported or if I am doing something wrong? Any help is greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: XA transaction with multicast

chrajanirao
Can someone please help?
Reply | Threaded
Open this post in threaded view
|

RE: XA transaction with multicast

Claus Ibsen
In reply to this post by chrajanirao
Hi

Could you try with 1.5-SNAPSHOT?

If there is still an issue please report a ticket in JIRA and if possible submit an unit test demonstrating this bug/issue.

Then we are in a much better position to fix it.



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: chrajanirao [mailto:[hidden email]]
Sent: 2. oktober 2008 02:32
To: [hidden email]
Subject: XA transaction with multicast


Hi,

I am trying to make XA transaction work in below example scenario route
defined based on spring xml. I am using camel 1.4.

<camel:route errorHandlerRef="transactionErrorHandler">
        <camel:from uri="timer:is3events?period=30000" />
        <camel:policy ref="PROPAGATION_REQUIRED" />
        <camel:setBody>
                <camel:el>
                        select * from events where processed=0 order by id
                </camel:el>
        </camel:setBody>
        <camel:to uri="jdbc:is3DataSource?readSize=1" />
        <camel:multicast>
                <camel:pipeline>
                        <camel:process ref="updateEventProcessor" />
                        <camel:process ref="myEventProcessor" />
                </camel:pipeline>
                <camel:pipeline>
                        <camel:setBody>
                                <camel:el>${in.body[0]['MESSAGE']}</camel:el>
                        </camel:setBody>
                        <camel:to uri="activemq:queue:USERS.xaevents" />
                </camel:pipeline>
        </camel:multicast>
</camel:route>

I have a table called events with id, message and processed columns. I want
to read from this table and send messages to activemq queue and update the
rows with processed=1 in XA transaction. I have this myEventProcessor as a
test processor to throw exception on specific values to simulate failing.

What I noticed is that if we have pipeline with multiple processors under
multicast and if one of those processes fail camel says its breaking out of
pipeline but it does not rollback the transaction. instead, its continuing
with the next pipeline under that multicast. It works fine i.e. rollsback if
the pipeline inside the multicast has only one process in it.

Can someone explain me if this scenario is not supported or if I am doing
something wrong? Any help is greatly appreciated.
--
View this message in context: http://www.nabble.com/XA-transaction-with-multicast-tp19771608s22882p19771608.html
Sent from the Camel - Users mailing list archive at Nabble.com.