camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fush <>
Subject Will onException handle exceptions thrown from 'when' clause?
Date Tue, 16 Dec 2008 13:26:11 GMT

See the route below. beanOne throws ExceptionOneException and beanTwo throws
ExceptionTwoException. It seems that the only exception that is actually
being caught and handled by an onException clause, is the
ExceptionOneException. The ExceptionTwoException goes all the way through,
without being caught and routet to the exceptionTwoQueue as it's supposed
to. Can anyone here confirm this behavior? And is it supposed to work like

	<camelContext id="MyCamelContext
		<endpoint id="myMainQueue" uri="activemq:${my.project.queue.main}"/>
		<endpoint id="exceptionOneQueue"
		<endpoint id="exceptionTwoQueue"
			<from ref="myMainQueue" />
				<redeliveryPolicy maximumRedeliveries="0" />
				<to ref="exceptionOneQueue"/>
				<redeliveryPolicy maximumRedeliveries="0" />
				<to ref="exceptionTwoQueue"/>
				<redeliveryPolicy maximumRedeliveries="0" />
				<jaxb prettyPrint="true" contextPath="my.project.domain" />
					<methodCall bean="beanTwo" method="methodFromBeanTwo"/>
					<to uri="bean:beanOne?methodName=methodFromBeanOne" />
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message