Hi If you are using Camel 2.0 you got the onCompletion http://davsclaus.blogspot.com/2009/06/on-road-to-camel-20-oncompletion.html
Which allows you to do further handling after the exchange is kinda finished. For example to send a warning email. The rollback should happen automatically in an exception occurs which is not handled. However in Camel 2.0 you can also force a rollback with the .rollback() DSL. On Fri, Oct 2, 2009 at 6:47 PM, Purcell, Chris (London) <[email protected]> wrote: > Hi all, > > I'm writing a Camel pipeline and I'd like to do both of the following > when an exception is thrown: > > (1) Roll back the current transaction, if one has been started (it > starts mid-pipeline) > (2) Do some further handling of the current message, ultimately sending > a warning email about the problem > > I can find a way to do either of the above, but I cannot seem to do > both. Adding a custom error handler appears to silently disable the > rollback. > > I cannot process the error in the object initially sending the message > to the queue, as I'm actually splitting the message and handling the > components separately, one transaction each, and need to know exactly > which one(s) failed -- and let the remainder succeed. > > Cheers, > Chris > > ********************************************************************** > Please consider the environment before printing this email or its > attachments. > The contents of this email are for the named addressees only. It contains > information which may be confidential and privileged. If you are not the > intended recipient, please notify the sender immediately, destroy this email > and any attachments and do not otherwise disclose or use them. Email > transmission is not a secure method of communication and Man Investments > cannot accept responsibility for the completeness or accuracy of this email > or any attachments. Whilst Man Investments makes every effort to keep its > network free from viruses, it does not accept responsibility for any computer > virus which might be transferred by way of this email or any attachments. > This email does not constitute a request, offer, recommendation or > solicitation of any kind to buy, subscribe, sell or redeem any investment > instruments or to perform other such transactions of any kind. Man > Investments reserves the right to monitor, record and retain all electronic > communications through its network to ensure the integrity of its systems, > for record keeping and regulatory purposes. > Visit us at: www.maninvestments.com > TG0908 > ********************************************************************** > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
