Hi doTry, doCatch, doFinally is meant to work 100% like try .. catch .. finally in regular Java.
So doFinally is called *always* no matter what. And if you do a <rollback/> in doFinally then you will *always* do a rollback :) On Mon, Jul 13, 2009 at 2:49 PM, Charles Moulliard<[email protected]> wrote: > Hi, > > What will happen if an error occur in the finally block execution defined > here after ? > Is the rollback put at the right place ? > > <route> > <from uri="direct:start"/> > <transacted/> > <doTry> > <process ref="processorFail"/> > <to uri="mock:result"/> > <doCatch> > <!-- catch multiple exceptions --> > <exception>java.io.IOException</exception> > <exception>java.lang.IllegalStateException</exception> > <to uri="mock:catch"/> > </doCatch> > <doFinally> > <to uri="bean:finally"/> // The call to this bean generates an > error > <rollback/> // Is it the right place of the rollback ????????? > </doFinally> > </doTry> > </route> > > Regards, > > > Charles Moulliard > Senior Enterprise Architect > Apache Camel Committer > > ***************************** > blog : http://cmoulliard.blogspot.com > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
