You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Garry <gm...@hotmail.com> on 2008/08/19 22:23:04 UTC
How to configure exception handling in XML
Hi,
While I know how to define exception handling in Java DSL:
errorHandler(deadLetterChannel());
exception(java.lang.Exception.class.to("...");
I'm having a hard time figuring it out in XML. I've
looked at the test cases but they don't do much xml configuration;
working backwards from camel-spring.xsd is kinda tough.
Would someone send me - or point me to - an example of global and
local error and exception configuration in XML?
Thanks, Garry
--
View this message in context: http://www.nabble.com/How-to-configure-exception-handling-in-XML-tp19057955s22882p19057955.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to configure exception handling in XML
Posted by Jon Anstey <ja...@gmail.com>.
Here's an example of a global error handler:
http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/errorHandler.xml
There's an example of catching a local exception here:
http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml
Without perusing the XSD I'm not sure how to specify something exactly like
"exception(java.lang.Exception.class.to<http://java.lang.exception.class.to/>("...");"
Anybody know how to configure this bit?
Cheers,
Jon
On Tue, Aug 19, 2008 at 5:53 PM, Garry <gm...@hotmail.com> wrote:
>
> Hi,
>
> While I know how to define exception handling in Java DSL:
>
> errorHandler(deadLetterChannel());
> exception(java.lang.Exception.class.to("...");
>
> I'm having a hard time figuring it out in XML. I've
> looked at the test cases but they don't do much xml configuration;
> working backwards from camel-spring.xsd is kinda tough.
>
> Would someone send me - or point me to - an example of global and
> local error and exception configuration in XML?
>
> Thanks, Garry
> --
> View this message in context:
> http://www.nabble.com/How-to-configure-exception-handling-in-XML-tp19057955s22882p19057955.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>