On Thu, Aug 5, 2010 at 11:15 AM, S. Ali Tokmen <[email protected]> wrote: > Hello again > > On 05/08/2010 10:26, Willem Jiang wrote: >> >> Just have a second thought, we should let CxfConsumer check if the >> exchange out message is the fault message first, if you set the Exchange to >> failed, it will trigger the ErrorHandler and the other two processor will >> not be processed. > > Does the CxfConsumer also check internal routing steps? If I for example > make the route a bit more complex (with some file and direct: handling): > > from("cxf:...") > .process(new ExtractSomeArgumentProcessor()) > .process(new TransformArgumentAsXML()) > .to("file:...") > .to("bean:someBeanThatDoesExternalBusinessLogic") > .process(new TransformBeanResponseToCxfResponse()) > > In this case, if one of the processors return a fault, will the file be > written or the external bean get called? I would of course like it not to. >
Yes if a Camel Message has been marked as a fault then the routing engine will not continue routing it. > We were making, for example, the bean throw an exception so that processing > stops. Do you think the bean should rather return a Fault and not throw an > exception? Notice that will be hard for beans like EJBs, which need to > conform to a Java interface. > > Again, if you believe something is wrong with the logic of the route please > let me know. > > Cheers > > -- > > S. Ali Tokmen > [email protected] > > Office: +33 4 76 29 76 19 > GSM: +33 66 43 00 555 > > Bull, Architect of an Open World TM > http://www.bull.com > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
