Modified: websites/production/camel/content/error-handler.html
==============================================================================
--- websites/production/camel/content/error-handler.html (original)
+++ websites/production/camel/content/error-handler.html Fri Aug 25 08:22:01 
2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' 
rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' 
rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' 
type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' 
type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' 
type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' 
type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: Error Handler
@@ -86,165 +75,47 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="ErrorHandler-ErrorHandler">Error 
Handler</h2><p>Camel supports pluggable <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/ErrorHandler.html";>ErrorHandler</a>
 strategies to deal with errors processing an <a shape="rect" 
href="event-driven-consumer.html">Event Driven Consumer</a>. An alternative is 
to specify the error handling directly in the <a shape="rect" 
href="dsl.html">DSL</a> using the <a shape="rect" 
href="exception-clause.html">Exception Clause</a>.</p><p>For introduction and 
background material see <a shape="rect" 
href="error-handling-in-camel.html">Error handling in Camel</a>.</p><div 
class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Exception Clause</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Using <a shape
 ="rect" href="error-handler.html">Error Handler</a> combined with <a 
shape="rect" href="exception-clause.html">Exception Clause</a> is a very 
powerful combination. We encourage end-users to use this combination in your 
error handling strategies. See samples and <a shape="rect" 
href="exception-clause.html">Exception Clause</a>.</p></div></div><div 
class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Using try ... catch ... finally</p><span class="aui-icon 
aui-icon-small aui-iconfont-approve 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Related to error handling is the 
<a shape="rect" href="try-catch-finally.html">Try Catch Finally</a> as DSL you 
can use directly in your route. Its basically a mimic of the regular try catch 
finally in the Java language but with more power.</p></div></div><p>The current 
implementations Camel provides out of the box are:</p><h4 
id="ErrorHandler-Non-transacted:">Non-transacte
 d<strong>:</strong></h4><ul><li><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a> is the default error 
handler in Camel. This error handler does not support a dead letter queue, it 
will propagate exceptions back to the caller, as if there where no error 
handler at all. It has a limited set of features.</li><li><a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> which supports 
attempting to redeliver the message exchange a number of times before sending 
it to a dead letter 
endpoint</li><li><strong><code>LoggingErrorHandler</code></strong> for just 
catching and logging 
exceptions</li><li><strong><code>NoErrorHandler</code></strong> for no error 
handling</li></ul><h4 id="ErrorHandler-Transacted:">Transacted:</h4><ul><li><a 
shape="rect" href="transactionerrorhandler.html">TransactionErrorHandler</a> is 
the default error handler in Camel for transacted routes. See the <a 
shape="rect" href="transactional-client.html">Transactional Client</a> EIP p
 attern.</li></ul><p>These error handlers can be applied in the <a shape="rect" 
href="dsl.html">DSL</a> to an entire set of rules or a specific routing rule as 
we show in the next examples. Error handling rules are inherited on each 
routing rule within a single <a shape="rect" 
href="routebuilder.html">RouteBuilder</a></p><h3 
id="ErrorHandler-ShortSummaryoftheProvidedErrorHandlers">Short Summary of the 
Provided Error Handlers</h3><h4 id="ErrorHandler-DefaultErrorHandler"><a 
shape="rect" href="defaulterrorhandler.html">DefaultErrorHandler</a></h4><p>The 
<a shape="rect" href="defaulterrorhandler.html">DefaultErrorHandler</a> is the 
default error handler in Camel. Unlike <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> it does not have any 
dead letter queue, and do <strong>not</strong> handle exceptions by 
default.</p><h4 id="ErrorHandler-DeadLetterChannel"><a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a></h4><p>The <a 
shape="rect" href="dead
 -letter-channel.html">Dead Letter Channel</a> will redeliver at most 6 times 
using 1 second delay, and if the exchange failed it will be logged 
at&#160;<strong><code>ERROR</code></strong> level.</p><p>You can configure the 
default dead letter endpoint to use:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-RouteBuilder builder = new RouteBuilder() {
-    public void configure() {
-        // using dead letter channel with a seda queue for errors
-        errorHandler(deadLetterChannel(&quot;seda:errors&quot;));
-
-        // here is our route
-        from(&quot;seda:a&quot;).to(&quot;seda:b&quot;);
-    }
-};
-]]></script>
-</div></div>or in Spring DSL:<div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;bean 
id=&quot;deadLetterErrorHandler&quot; 
class=&quot;org.apache.camel.builder.DeadLetterChannelBuilder&quot;&gt;
-  &lt;property name=&quot;deadLetterUri&quot; value=&quot;log:dead&quot;/&gt;
+<div class="wiki-content maincontent"><h2 id="ErrorHandler-ErrorHandler">Error 
Handler</h2><p>Camel supports pluggable <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/ErrorHandler.html";>ErrorHandler</a>
 strategies to deal with errors processing an <a shape="rect" 
href="event-driven-consumer.html">Event Driven Consumer</a>. An alternative is 
to specify the error handling directly in the <a shape="rect" 
href="dsl.html">DSL</a> using the <a shape="rect" 
href="exception-clause.html">Exception Clause</a>.</p><p>For introduction and 
background material see <a shape="rect" 
href="error-handling-in-camel.html">Error handling in Camel</a>.</p><parameter 
ac:name="title">Exception Clause</parameter><rich-text-body><p>Using <a 
shape="rect" href="error-handler.html">Error Handler</a> combined with <a 
shape="rect" href="exception-clause.html">Exception Clause</a> is a very 
powerful combination. We encourage end-users t
 o use this combination in your error handling strategies. See samples and <a 
shape="rect" href="exception-clause.html">Exception 
Clause</a>.</p></rich-text-body><parameter ac:name="title">Using try ... catch 
... finally</parameter><rich-text-body><p>Related to error handling is the <a 
shape="rect" href="try-catch-finally.html">Try Catch Finally</a> as DSL you can 
use directly in your route. Its basically a mimic of the regular try catch 
finally in the Java language but with more power.</p></rich-text-body><p>The 
current implementations Camel provides out of the box are:</p><h4 
id="ErrorHandler-Non-transacted:">Non-transacted<strong>:</strong></h4><ul><li><a
 shape="rect" href="defaulterrorhandler.html">DefaultErrorHandler</a> is the 
default error handler in Camel. This error handler does not support a dead 
letter queue, it will propagate exceptions back to the caller, as if there 
where no error handler at all. It has a limited set of features.</li><li><a 
shape="rect" href="dead-lette
 r-channel.html">Dead Letter Channel</a> which supports attempting to redeliver 
the message exchange a number of times before sending it to a dead letter 
endpoint</li><li><strong><code>LoggingErrorHandler</code></strong> for just 
catching and logging 
exceptions</li><li><strong><code>NoErrorHandler</code></strong> for no error 
handling</li></ul><h4 id="ErrorHandler-Transacted:">Transacted:</h4><ul><li><a 
shape="rect" href="transactionerrorhandler.html">TransactionErrorHandler</a> is 
the default error handler in Camel for transacted routes. See the <a 
shape="rect" href="transactional-client.html">Transactional Client</a> EIP 
pattern.</li></ul><p>These error handlers can be applied in the <a shape="rect" 
href="dsl.html">DSL</a> to an entire set of rules or a specific routing rule as 
we show in the next examples. Error handling rules are inherited on each 
routing rule within a single <a shape="rect" 
href="routebuilder.html">RouteBuilder</a></p><h3 
id="ErrorHandler-ShortSummaryoftheProvid
 edErrorHandlers">Short Summary of the Provided Error Handlers</h3><h4 
id="ErrorHandler-DefaultErrorHandler"><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a></h4><p>The <a 
shape="rect" href="defaulterrorhandler.html">DefaultErrorHandler</a> is the 
default error handler in Camel. Unlike <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> it does not have any 
dead letter queue, and do <strong>not</strong> handle exceptions by 
default.</p><h4 id="ErrorHandler-DeadLetterChannel"><a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a></h4><p>The <a 
shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a> will 
redeliver at most 6 times using 1 second delay, and if the exchange failed it 
will be logged at&#160;<strong><code>ERROR</code></strong> level.</p><p>You can 
configure the default dead letter endpoint to 
use:<plain-text-body>{snippet:id=e3|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/builder
 /ErrorHandlerTest.java}</plain-text-body>or in Spring DSL:</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;bean 
id="deadLetterErrorHandler" 
class="org.apache.camel.builder.DeadLetterChannelBuilder"&gt;
+  &lt;property name="deadLetterUri" value="log:dead"/&gt;
 &lt;/bean&gt;
 
-&lt;camelContext errorHandlerRef=&quot;deadLetterErrorHandler&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+&lt;camelContext errorHandlerRef="deadLetterErrorHandler" 
xmlns="http://camel.apache.org/schema/spring"&gt;
   &lt;!-- ... --&gt;
 &lt;/camelContext&gt;
-]]></script>
-</div></div><p>or also from <strong>Camel 2.3.0:<br 
clear="none"></strong></p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camel:errorHandler 
id=&quot;deadLetterErrorHandler&quot; type=&quot;DeadLetterChannel&quot; 
deadLetterUri=&quot;log:dead&quot;&gt;
+</plain-text-body><p>or also from <strong>Camel 2.3.0:<br 
clear="none"></strong></p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;camel:errorHandler 
id="deadLetterErrorHandler" type="DeadLetterChannel" 
deadLetterUri="log:dead"&gt;
 
-&lt;camel:camelContext errorHandlerRef=&quot;deadLetterErrorHandler&quot;&gt;
+&lt;camel:camelContext errorHandlerRef="deadLetterErrorHandler"&gt;
   ...
 &lt;/camel:camelContext&gt;
-]]></script>
-</div></div><h4 
id="ErrorHandler-TheLoggingErrorHandler">The&#160;<code>LoggingErrorHandler</code></h4><p>The
 logging error handler will log (by default 
at&#160;<strong><code>ERROR</code></strong> level) whenever an uncaught 
exception is thrown. The logging category, logger and level may all be defined 
in the builder.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[errorHandler(loggingErrorHandler(&quot;mylogger.name&quot;).level(LoggingLevel.INFO));
-]]></script>
-</div></div><p>or in Spring DSL:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;loggingErrorHandler&quot; 
class=&quot;org.apache.camel.builder.LoggingErrorHandler&quot;&gt;
-  &lt;property name=&quot;logName&quot; value=&quot;mylogger.name&quot;/&gt;
-  &lt;property name=&quot;level&quot; value=&quot;DEBUG&quot;/&gt;
+</plain-text-body><h4 
id="ErrorHandler-TheLoggingErrorHandler">The&#160;<code>LoggingErrorHandler</code></h4><p>The
 logging error handler will log (by default 
at&#160;<strong><code>ERROR</code></strong> level) whenever an uncaught 
exception is thrown. The logging category, logger and level may all be defined 
in the builder.</p><parameter 
ac:name="language">java</parameter><plain-text-body>errorHandler(loggingErrorHandler("mylogger.name").level(LoggingLevel.INFO));
+</plain-text-body><p>or in Spring DSL:</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;bean 
id="loggingErrorHandler" 
class="org.apache.camel.builder.LoggingErrorHandler"&gt;
+  &lt;property name="logName" value="mylogger.name"/&gt;
+  &lt;property name="level" value="DEBUG"/&gt;
 &lt;/bean&gt;
 
-&lt;camelContext errorHandlerRef=&quot;loggingErrorHandler&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+&lt;camelContext errorHandlerRef="loggingErrorHandler" 
xmlns="http://camel.apache.org/schema/spring"&gt;
   ...
 &lt;/camelContext&gt;
-]]></script>
-</div></div><p>or also from <strong>Camel 2.3.0</strong>:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camel:errorHandler 
id=&quot;loggingErrorHandler&quot; type=&quot;LoggingErrorHandler&quot; 
logName=&quot;mylogger.name&quot; level=&quot;DEBUG&quot;/&gt;
+</plain-text-body><p>or also from <strong>Camel 2.3.0</strong>:</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;camel:errorHandler 
id="loggingErrorHandler" type="LoggingErrorHandler" logName="mylogger.name" 
level="DEBUG"/&gt;
 
-&lt;camel:camelContext errorHandlerRef=&quot;loggingErrorHandler&quot;&gt;
+&lt;camel:camelContext errorHandlerRef="loggingErrorHandler"&gt;
   ...
 &lt;/camel:camelContext&gt;
-]]></script>
-</div></div><p>This would create an error handler which logs exceptions using 
the category&#160;<strong><code>mylogger.name</code></strong> and uses the 
level&#160;<strong><code>INFO</code></strong> for all log messages 
created.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;seda:a&quot;)
-  
.errorHandler(loggingErrorHandler(&quot;mylogger.name&quot;).level(LoggingLevel.DEBUG))
-  .to(&quot;seda:b&quot;);
-]]></script>
-</div></div><p>Loggers may also be defined for specific routes.</p><h4 
id="ErrorHandler-TheNoErrorHandler">The&#160;<code>NoErrorHandler</code></h4><p>The
 no error handler is to be used for disabling error handling.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[errorHandler(noErrorHandler());
-]]></script>
-</div></div><p>or in Spring DSL:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;noErrorHandler&quot; 
class=&quot;org.apache.camel.builder.NoErrorHandlerBuilder&quot;/&gt;
+</plain-text-body><p>This would create an error handler which logs exceptions 
using the category&#160;<strong><code>mylogger.name</code></strong> and uses 
the level&#160;<strong><code>INFO</code></strong> for all log messages 
created.</p><parameter 
ac:name="language">java</parameter><plain-text-body>from("seda:a")
+  .errorHandler(loggingErrorHandler("mylogger.name").level(LoggingLevel.DEBUG))
+  .to("seda:b");
+</plain-text-body><p>Loggers may also be defined for specific routes.</p><h4 
id="ErrorHandler-TheNoErrorHandler">The&#160;<code>NoErrorHandler</code></h4><p>The
 no error handler is to be used for disabling error handling.</p><parameter 
ac:name="language">java</parameter><plain-text-body>errorHandler(noErrorHandler());
+</plain-text-body><p>or in Spring DSL:</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;bean id="noErrorHandler" 
class="org.apache.camel.builder.NoErrorHandlerBuilder"/&gt;
 
-&lt;camelContext errorHandlerRef=&quot;noErrorHandler&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+&lt;camelContext errorHandlerRef="noErrorHandler" 
xmlns="http://camel.apache.org/schema/spring"&gt;
   ...
 &lt;/camelContext&gt;
-]]></script>
-</div></div><p>or also from <strong>Camel 2.3.0</strong>:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camel:errorHandler 
id=&quot;noErrorHandler&quot; type=&quot;NoErrorHandler&quot;/&gt;
+</plain-text-body><p>or also from <strong>Camel 2.3.0</strong>:</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;camel:errorHandler 
id="noErrorHandler" type="NoErrorHandler"/&gt;
 
-&lt;camel:camelContext errorHandlerRef=&quot;noErrorHandler&quot;&gt;
+&lt;camel:camelContext errorHandlerRef="noErrorHandler"&gt;
   ...
 &lt;/camel:camelContext&gt;
-]]></script>
-</div></div><h4 id="ErrorHandler-TransactionErrorHandler"><a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a></h4><p>The <a 
shape="rect" href="transactionerrorhandler.html">TransactionErrorHandler</a> is 
the default error handler in Camel for transacted routes.</p><div 
class="confluence-information-macro confluence-information-macro-tip"><span 
class="aui-icon aui-icon-small aui-iconfont-approve 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>If you have marked a route as 
transacted using the <strong><code>transacted</code></strong> DSL then Camel 
will automatic use a <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>. It will try to 
lookup the global/per route configured error handler and use it if its a 
<strong><code>TransactionErrorHandlerBuilder</code></strong> instance. If not 
Camel will automatic create a temporary <a shape="rect" 
href="transactionerrorhandler.html">TransactionE
 rrorHandler</a> that overrules the default error handler. This is convention 
over configuration.</p></div></div><h3 
id="ErrorHandler-FeaturesSupportbyVariouss">Features Support by Various <a 
shape="rect" href="error-handler.html">Error Handler</a>s</h3><p>Here is a 
breakdown of which features is supported by the <a shape="rect" 
href="error-handler.html">Error Handler</a>(s):</p><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Feature</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Supported By The Following <a shape="rect" 
href="error-handler.html">Error Handler</a></p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><em><code>all 
scopes</code></em></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-
 letter-channel.html">Dead Letter Channel</a></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>onException</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>onWhen</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>continued</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.htm
 l">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>handled</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Custom&#160;<code>ExceptionPolicy</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1"
  class="confluenceTd"><p><code>useOriginalBody</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>retryWhile</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>onRedelivery</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html
 ">TransactionErrorHandler</a>, <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a></p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>RedeliveryPolicy</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncDelayedRedelivery</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>redeliverWhileStopping</code></p></td><td c
 olspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><em><code>dead letter queue</code></em></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a></p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>onPrepareFailure</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a><span>, <a shape="rect" 
href="dead-letter-channel.html">Dead Letter 
Channel</a></span></p></td></tr></tbody></table></div><p>See <a shape="rect" 
href="exception-clause.html">Exception Clause</a> documentation for 
documentation of some of the features ab
 ove.</p><h3 id="ErrorHandler-Scopes">Scopes</h3><p>The error handler is scoped 
as either</p><ul class="alternate"><li>global</li><li>per route</li></ul><p>The 
following example shows how you can register a global error handler (in this 
case using the logging handler)</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-RouteBuilder builder = new RouteBuilder() {
-    public void configure() {
-        // use logging error handler
-        errorHandler(loggingErrorHandler(&quot;com.mycompany.foo&quot;));
-
-        // here is our regular route
-        from(&quot;seda:a&quot;).to(&quot;seda:b&quot;);
-    }
-};
-]]></script>
-</div></div>The following example shows how you can register a route specific 
error handler; the customized logging handler is only registered for the route 
from <a shape="rect" 
href="endpoint.html">Endpoint</a>&#160;<strong><code>seda:a</code></strong><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-RouteBuilder builder = new RouteBuilder() {
-    public void configure() {
-        // this route is using a nested logging error handler
-        from(&quot;seda:a&quot;)
-            // here we configure the logging error handler
-            .errorHandler(loggingErrorHandler(&quot;com.mycompany.foo&quot;))
-            // and we continue with the routing here
-            .to(&quot;seda:b&quot;);
-
-        // this route will use the default error handler (DeadLetterChannel)
-        from(&quot;seda:b&quot;).to(&quot;seda:c&quot;);
-    }
-};
-]]></script>
-</div></div><h3 id="ErrorHandler-SpringBasedConfiguration">Spring Based 
Configuration</h3><div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Java DSL vs. Spring 
DSL</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>The error handler is configured a 
bit differently in Java DSL and Spring DSL. Spring DSL relies more on standard 
Spring bean configuration whereas Java DSL uses fluent 
builders.</p></div></div><p>The error handler can be configured as a spring 
bean and scoped in:</p><ul class="alternate"><li>global (the camelContext 
tag)</li><li>per route (the route tag)</li><li>or per policy (the 
policy/transacted tag)</li></ul><p>The error handler is configured with the 
<strong><code>errorHandlerRef</code></strong> attribute.</p><div 
class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Error Handler Hierarc
 hy</p><span class="aui-icon aui-icon-small aui-iconfont-approve 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>The error handlers is inherited, 
so if you only have set a global error handler then its use everywhere. But you 
can override this in a route and use another error handler.</p></div></div><h4 
id="ErrorHandler-SpringBasedConfigurationSample">Spring Based Configuration 
Sample</h4><p>In this sample we configure a <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> on the route that 
should redeliver at most 3 times and use a little delay before retrying.<br 
clear="none"> First, we configure the reference 
to&#160;<strong><code>myDeadLetterErrorHandler</code></strong> using the 
<strong><code>errorHandlerRef</code></strong> attribute on the 
<code>route</code> tag.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-  &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-      &lt;template id=&quot;myTemplate&quot;/&gt;
-&lt;!-- set the errorHandlerRef to our DeadLetterChannel, this applies for 
this route only --&gt;
-      &lt;route errorHandlerRef=&quot;myDeadLetterErrorHandler&quot;&gt;
-          &lt;from uri=&quot;direct:in&quot;/&gt;
-          &lt;process ref=&quot;myFailureProcessor&quot;/&gt;
-          &lt;to uri=&quot;mock:result&quot;/&gt;
-      &lt;/route&gt;
-  &lt;/camelContext&gt;
-]]></script>
-</div></div>Then we 
configure&#160;<strong><code>myDeadLetterErrorHandler</code></strong> that is 
our <a shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a>. 
This configuration is standard Spring using the bean element.<br 
clear="none">Finally, we have another spring bean for the redelivery policy 
where we can configure the options for how many times to redeliver, delays 
etc.<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-   &lt;!-- here we configure our DeadLetterChannel --&gt;
-&lt;bean id=&quot;myDeadLetterErrorHandler&quot; 
class=&quot;org.apache.camel.builder.DeadLetterChannelBuilder&quot;&gt;
-    &lt;!-- exchanges is routed to mock:dead in cased redelivery failed --&gt;
-       &lt;property name=&quot;deadLetterUri&quot; 
value=&quot;mock:dead&quot;/&gt;
-       &lt;!-- reference the redelivery policy to use --&gt;
-       &lt;property name=&quot;redeliveryPolicy&quot; 
ref=&quot;myRedeliveryPolicyConfig&quot;/&gt;
-   &lt;/bean&gt;
-
-   &lt;!-- here we set the redelivery settings --&gt;
-&lt;bean id=&quot;myRedeliveryPolicyConfig&quot; 
class=&quot;org.apache.camel.processor.RedeliveryPolicy&quot;&gt;
-    &lt;!-- try redelivery at most 3 times, after that the exchange is dead 
and its routed to the mock:dead endpoint --&gt;
-       &lt;property name=&quot;maximumRedeliveries&quot; 
value=&quot;3&quot;/&gt;
-       &lt;!-- delay 250ms before redelivery --&gt;
-       &lt;property name=&quot;redeliveryDelay&quot; value=&quot;250&quot;/&gt;
-   &lt;/bean&gt;
-]]></script>
-</div></div>From <strong>Camel 2.3.0</strong>, camel provides a customer bean 
configuration for the Error Handler, you can find the examples here.<div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-&lt;errorHandler id=&quot;loggingErrorHandler&quot; 
type=&quot;LoggingErrorHandler&quot; logName=&quot;foo&quot; 
level=&quot;INFO&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;/&gt;
-
-&lt;!-- If don&#39;t specify type attribute, the type value will be set to 
DefaultErrorHandler --&gt;
-&lt;errorHandler id=&quot;errorHandler&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;/&gt;
-
-&lt;!-- You can define the redeliveryPolicy inside of the errorHandler --&gt;
-&lt;camel:errorHandler id=&quot;defaultErrorHandler&quot; 
type=&quot;DefaultErrorHandler&quot;&gt;
-    &lt;camel:redeliveryPolicy maximumRedeliveries=&quot;2&quot; 
redeliveryDelay=&quot;0&quot; logStackTrace=&quot;false&quot;/&gt;
-&lt;/camel:errorHandler&gt;
-
-&lt;camel:errorHandler id=&quot;deadLetterErrorHandler&quot; 
type=&quot;DeadLetterChannel&quot; deadLetterUri=&quot;log:dead&quot;&gt;
-    &lt;camel:redeliveryPolicy maximumRedeliveries=&quot;2&quot; 
redeliveryDelay=&quot;1000&quot; logHandled=&quot;true&quot; 
asyncDelayedRedelivery=&quot;true&quot;/&gt;
-&lt;/camel:errorHandler&gt;
-
-&lt;bean id=&quot;myErrorProcessor&quot; 
class=&quot;org.apache.camel.spring.handler.MyErrorProcessor&quot;/&gt;
-
-&lt;!-- TX error handler can be configured using a template --&gt;
-&lt;camel:errorHandler id=&quot;transactionErrorHandler&quot; 
type=&quot;TransactionErrorHandler&quot;
-                    transactionTemplateRef=&quot;PROPAGATION_REQUIRED&quot; 
onRedeliveryRef=&quot;myErrorProcessor&quot;/&gt;
-
-&lt;!-- or using a transaction manager --&gt;
-&lt;camel:errorHandler id=&quot;txEH&quot; 
type=&quot;TransactionErrorHandler&quot; 
transactionManagerRef=&quot;txManager&quot;/&gt;
-
-&lt;!-- You can also define the errorHandler inside the camelContext --&gt;
-&lt;camelContext errorHandlerRef=&quot;noErrorHandler&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-    &lt;errorHandler id=&quot;noErrorHandler&quot; 
type=&quot;NoErrorHandler&quot;/&gt;
-&lt;/camelContext&gt;
-]]></script>
-</div></div><h3 id="ErrorHandler-UsingtheTransactionalErrorHandler">Using 
the&#160;<code>TransactionalErrorHandler</code></h3><p>The&#160;<strong><code>TransactionalErrorHandler</code></strong>
 is based on spring transaction. This requires the usage of the camel-spring 
component. See <a shape="rect" href="transactional-client.html">Transactional 
Client</a> that has many samples for how to use and transactional behavior and 
configuration with this error handler.</p><h3 id="ErrorHandler-Seealso">See 
also</h3><ul class="alternate"><li><a shape="rect" 
href="error-handling-in-camel.html">Error handling in Camel</a> for 
introduction and background material on error handling in Camel</li><li><a 
shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a> for the 
dead letter error handler</li><li><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a> for the default error 
handler in Camel</li><li><a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHa
 ndler</a> for the default error handler for transacted routes</li><li><a 
shape="rect" href="transactional-client.html">Transactional Client</a> for 
transactional behavior</li><li><a shape="rect" 
href="exception-clause.html">Exception Clause</a> as it supports 
<strong>handling</strong> thrown exceptions</li><li><a shape="rect" 
href="try-catch-finally.html">Try Catch Finally</a> for try ... catch ... 
finally as DSL you can use in the routing</li></ul></div>
+</plain-text-body><h4 id="ErrorHandler-TransactionErrorHandler"><a 
shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a></h4><p>The <a 
shape="rect" href="transactionerrorhandler.html">TransactionErrorHandler</a> is 
the default error handler in Camel for transacted routes.</p><parameter 
ac:name="">[TransactionErrorHandler] is default for transacted 
routes</parameter><rich-text-body><p>If you have marked a route as transacted 
using the <strong><code>transacted</code></strong> DSL then Camel will 
automatic use a <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>. It will try to 
lookup the global/per route configured error handler and use it if its a 
<strong><code>TransactionErrorHandlerBuilder</code></strong> instance. If not 
Camel will automatic create a temporary <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a> that overrules 
the default error handler. This is convention over configuration.</p></rich-t
 ext-body><h3 id="ErrorHandler-FeaturesSupportbyVariouss">Features Support by 
Various <a shape="rect" href="error-handler.html">Error 
Handler</a>s</h3><p>Here is a breakdown of which features is supported by the 
<a shape="rect" href="error-handler.html">Error Handler</a>(s):</p><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Feature</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Supported By The Following <a shape="rect" 
href="error-handler.html">Error Handler</a></p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><em><code>all 
scopes</code></em></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" class="conflu
 enceTd"><p><code>onException</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>onWhen</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>continued</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler
 </a>, <a shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>handled</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Custom&#160;<code>ExceptionPolicy</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>useOriginalBody</code></p></td><td colspan="1" 
rowspan="1" class="conflu
 enceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>retryWhile</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>onRedelivery</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a><
 /p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>RedeliveryPolicy</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncDelayedRedelivery</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>redeliverWhileStopping</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultE
 rrorHandler</a>, <a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a>, <a 
shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><em><code>dead letter queue</code></em></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a></p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>onPrepareFailure</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><a shape="rect" 
href="defaulterrorhandler.html">DefaultErrorHandler</a><span>, <a shape="rect" 
href="dead-letter-channel.html">Dead Letter 
Channel</a></span></p></td></tr></tbody></table></div><p>See <a shape="rect" 
href="exception-clause.html">Exception Clause</a> documentation for 
documentation of some of the features above.</p><h3 
id="ErrorHandler-Scopes">Scopes</h3><p>The error handler is scoped as 
either</p><ul class="
 alternate"><li>global</li><li>per route</li></ul><p>The following example 
shows how you can register a global error handler (in this case using the 
logging 
handler)<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}</plain-text-body>The
 following example shows how you can register a route specific error handler; 
the customized logging handler is only registered for the route from <a 
shape="rect" 
href="endpoint.html">Endpoint</a>&#160;<strong><code>seda:a</code></strong><plain-text-body>{snippet:id=e2|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}</plain-text-body></p><h3
 id="ErrorHandler-SpringBasedConfiguration">Spring Based 
Configuration</h3><parameter ac:name="title">Java DSL vs. Spring 
DSL</parameter><rich-text-body><p>The error handler is configured a bit 
differently in Java DSL and Spring DSL. Spring DSL relies more on standard 
Spring bean configur
 ation whereas Java DSL uses fluent builders.</p></rich-text-body><p>The error 
handler can be configured as a spring bean and scoped in:</p><ul 
class="alternate"><li>global (the camelContext tag)</li><li>per route (the 
route tag)</li><li>or per policy (the policy/transacted tag)</li></ul><p>The 
error handler is configured with the 
<strong><code>errorHandlerRef</code></strong> attribute.</p><parameter 
ac:name="title">Error Handler Hierarchy</parameter><rich-text-body><p>The error 
handlers is inherited, so if you only have set a global error handler then its 
use everywhere. But you can override this in a route and use another error 
handler.</p></rich-text-body><h4 
id="ErrorHandler-SpringBasedConfigurationSample">Spring Based Configuration 
Sample</h4><p>In this sample we configure a <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> on the route that 
should redeliver at most 3 times and use a little delay before retrying.<br 
clear="none"> First, we configure the ref
 erence to&#160;<strong><code>myDeadLetterErrorHandler</code></strong> using 
the <strong><code>errorHandlerRef</code></strong> attribute on the 
<code>route</code> 
tag.<plain-text-body>{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/DeadLetterChannelRedeliveryConfigTest-context.xml}</plain-text-body>Then
 we configure&#160;<strong><code>myDeadLetterErrorHandler</code></strong> that 
is our <a shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a>. 
This configuration is standard Spring using the bean element.<br 
clear="none">Finally, we have another spring bean for the redelivery policy 
where we can configure the options for how many times to redeliver, delays 
etc.<plain-text-body>{snippet:id=e2|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/DeadLetterChannelRedeliveryConfigTest-context.xml}</plain-text-body>From
 <strong>Camel 2.3.0</strong>, camel provides 
 a customer bean configuration for the Error Handler, you can find the examples 
here.<plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.xml}</plain-text-body></p><h3
 id="ErrorHandler-UsingtheTransactionalErrorHandler">Using 
the&#160;<code>TransactionalErrorHandler</code></h3><p>The&#160;<strong><code>TransactionalErrorHandler</code></strong>
 is based on spring transaction. This requires the usage of the camel-spring 
component. See <a shape="rect" href="transactional-client.html">Transactional 
Client</a> that has many samples for how to use and transactional behavior and 
configuration with this error handler.</p><h3 id="ErrorHandler-Seealso">See 
also</h3><ul class="alternate"><li><a shape="rect" 
href="error-handling-in-camel.html">Error handling in Camel</a> for 
introduction and background material on error handling in Camel</li><li><a 
shape="rect" href="dead-letter-chann
 el.html">Dead Letter Channel</a> for the dead letter error handler</li><li><a 
shape="rect" href="defaulterrorhandler.html">DefaultErrorHandler</a> for the 
default error handler in Camel</li><li><a shape="rect" 
href="transactionerrorhandler.html">TransactionErrorHandler</a> for the default 
error handler for transacted routes</li><li><a shape="rect" 
href="transactional-client.html">Transactional Client</a> for transactional 
behavior</li><li><a shape="rect" href="exception-clause.html">Exception 
Clause</a> as it supports <strong>handling</strong> thrown 
exceptions</li><li><a shape="rect" href="try-catch-finally.html">Try Catch 
Finally</a> for try ... catch ... finally as DSL you can use in the 
routing</li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">


Reply via email to