camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trivedi kumar b <Trivedi.Bodlap...@ge.com>
Subject Re: using Transactions in the camel router
Date Tue, 25 Aug 2009 07:18:35 GMT

Hi,

This is working but with small issue, my bean (forex: y) is throwing an
exception which is why the transaction is getting rollbacked. However, this
exception is propagated to the client, instead I want to handle the
exception. I have added onException() in my route, which didnt worked.

Thanks,
Trivedi

Claus Ibsen-2 wrote:
> 
> Hi
> 
> If the from(x) is from a JMS queue then you should remember to add
> transacted=true on the URI on it, eg
> 
> from("activemq:queue:foo?transacted=true")
>   .policy(required)
>   .beanRef(y);
> 
> As its a bit special for that one as it need to do some hooks into the
> TX manager.
> 
> 
> On Tue, Aug 25, 2009 at 7:42 AM, trivedi kumar
> b<Trivedi.Bodlapati@ge.com> wrote:
>>
>> Hi,
>>
>> Thank you for the response on this. It helps me.
>>
>> Thanks,
>> Trivedi
>>
>> trivedi kumar b wrote:
>>>
>>>
>>> Hi All,
>>>
>>> I am new to this concept called using transactions inside my router. I
>>> did
>>> some googling on this, got some examples on jms Transaction Client. I am
>>> trying to use transactions in my router. Here is my requirement:
>>>
>>> In my router, I want to start a transaction (new one) before I proceed
>>> with next processor in the router. The next processor basically makes a
>>> call to a bean, which would either throw an error or successful message.
>>> If it is exception, I want to rollback the transaction.
>>>
>>> Can someone help me on this?
>>>
>>> thanks in advance,
>>> Trivedi
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/using-Transactions-in-the-camel-router-tp25120513p25128696.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://www.nabble.com/using-Transactions-in-the-camel-router-tp25120513p25129569.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message