On Tue, Aug 25, 2009 at 9:18 AM, trivedi kumar
b<[email protected]> wrote:
>
> 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.
>
What do you use for transport with your client? Can you post a snippet
of your sample.
What version of Camel are you using?
> 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<[email protected]> 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.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus