Using camel 2.10. 

I have a route similar to the following:

                <route>
                        <from uri="file:c:/cameldata/a?doneFileName=GO">
                        <doTry>
                        <to uri="bean:utilBean?method=doStuff"/>
                                <doCatch>
                                        
<exception>java.lang.Exception</exception>
                                        
<handled><constant>false</constant></handled>
                                        <to 
uri="bean:utilBean?method=doFailStuff"/>
                                </doCatch>
                        </doTry>
                </route>

If multiple files are placed in the directory, then the doneFile GO is
placed in it, it will process all of the files sequentially, each going thru
the route. Normally this is good.

However, what I want to do is stop the batch if there is an exception with
one of the files as caught by the <doTry><doCatch>.  Right now, it catches
the exception and executes "doFailStuff" but it proceeds to process the
remaining files happily, but I don't want that -- I want the entire route to
give up there. Is there a way?

Hope that's clear.

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-break-out-of-a-batch-tp5723425.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to