You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Travis Klotz <tr...@gmail.com> on 2011/07/01 17:29:27 UTC

Re: JTA Transactions & Camel Routes

I feel like i'm missing something.  Using the same setup as above, but
with this route:

        <camel:route id="testRoute">
            <camel:from uri="jms:queue:osgi.testQueue1"/>
            <camel:transacted ref="PROPAGATION_REQUIRED"/>
            <camel:to uri="jms:queue:osgi.testQueue2"/>
            <camel:bean ref="testBean" method="testCall" />
        </camel:route>

where testBean.testCall throws a RuntimeException.

I expect no message to be delivered into osgi.testQueue2, but after
the exception is thrown, it appears the txn is not rolling back and
the message is delivered to testQueue2.  The logs talk about a txn
being rolled back, but it does not seem to have any effect.

Am I missing something obvious?

Travis

On Thu, Jun 30, 2011 at 3:30 AM, Ioannis Canellos <io...@gmail.com> wrote:
> At first glance it seems ok to me. What I usually do in order to test if
> everything is fine, is a unit test on a route from resource a to resource b
> that throws an exception in the end.
>
> Camel in Action contain a great example of such unit test in Chapter 9. You
> can have a look at the example here:
> http://camelinaction.googlecode.com/svn/trunk/chapter9/xa/
>
> --
> *Ioannis Canellos*
> *
>  http://iocanel.blogspot.com
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> Apache ServiceMix <http://servicemix.apache.org/>  Committer
> *
>