Author: buildbot
Date: Wed Apr 25 18:18:57 2012
New Revision: 814451
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/error-handler.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/error-handler.html
==============================================================================
--- websites/production/camel/content/error-handler.html (original)
+++ websites/production/camel/content/error-handler.html Wed Apr 25 18:18:57
2012
@@ -81,8 +81,6 @@
<p>For introduction and background material see <a shape="rect"
href="error-handling-in-camel.html" title="Error handling in Camel">Error
handling in Camel</a>.</p>
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1"
rowspan="1"><b>Camel 2.0 has a new default error handler</b><br clear="none">In
Camel 2.0 onwards there default error handler is changed from <a shape="rect"
href="dead-letter-channel.html" title="Dead Letter Channel">Dead Letter
Channel</a> to <a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a>. This error handler does
not support a dead letter queue and will return exceptions back to the caller.
This is what you expects when working with regular Java that exceptions will be
thrown back to the caller.</td></tr></table></div>
-
<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1"
rowspan="1"><b>Exception Clause</b><br clear="none">Using <a shape="rect"
href="error-handler.html" title="Error Handler">Error Handler</a> combined with
<a shape="rect" href="exception-clause.html" title="Exception Clause">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" title="Exception Clause">Exception
Clause</a>.</td></tr></table></div>
<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1"
rowspan="1"><b>Using try ... catch ... finally</b><br clear="none">Related to
error handling is the <a shape="rect" href="try-catch-finally.html" title="Try
Catch Finally">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.</td></tr></table></div>
@@ -90,28 +88,24 @@
<p>The current implementations Camel provides out of the box are:</p>
<h4><a shape="rect" name="ErrorHandler-Nontransacted"></a>Non transacted</h4>
-<ul><li><a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a> is the default error
handler in <b>Camel 2.0 onwards</b>. 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" title="Dead Letter Channel">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>LoggingErrorHandler for just catching and logging
exceptions</li><li>NoErrorHandler for no error handling</li></ul>
+<ul><li><a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">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" title="Dead Letter Channel">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>LoggingErrorHandler for just catching and logging
exceptions</li><li>NoErrorHandler for no error handling</li></ul>
<h4><a shape="rect" name="ErrorHandler-Transacted"></a>Transacted</h4>
-<ul><li><a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> is the default
error handler in <b>Camel 2.0 onwards</b> for transacted routes. See the <a
shape="rect" href="transactional-client.html" title="Transactional
Client">Transactional Client</a> EIP pattern.</li></ul>
+<ul><li><a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> is the default
error handler in Camel for transacted routes. See the <a shape="rect"
href="transactional-client.html" title="Transactional Client">Transactional
Client</a> EIP pattern.</li></ul>
<p>These error handlers can be applied in the <a shape="rect" href="dsl.html"
title="DSL">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"
title="RouteBuilder">RouteBuilder</a></p>
-<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1"
rowspan="1"><b>Transaction in Camel 1.x</b><br clear="none">If the route is
transactional then the <a shape="rect" href="dead-letter-channel.html"
title="Dead Letter Channel">Dead Letter Channel</a> is disabled. The
<tt>exchange.isTransacted()</tt> is used to determine if an Exchange is
transacted or not.<br clear="none">
-So if you are using transacted routes then you should configure the
TransactionErrorHandler instread of DeadLetterChannel. See <a shape="rect"
href="transactional-client.html" title="Transactional Client">Transactional
Client</a> for further details and samples.</td></tr></table></div>
-
-
<h3><a shape="rect"
name="ErrorHandler-ShortSummaryoftheprovidedErrorHandlers"></a>Short Summary of
the provided Error Handlers</h3>
-<h4><a shape="rect"
name="ErrorHandler-DefaultErrorHandlernewinCamel2.0"></a><a shape="rect"
href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a> new in Camel 2.0</h4>
+<h4><a shape="rect" name="ErrorHandler-DefaultErrorHandler"></a><a
shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a></h4>
-<p>The <a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a> is the new default error
handler in Camel 2.0. Unlike <a shape="rect" href="dead-letter-channel.html"
title="Dead Letter Channel">Dead Letter Channel</a> it does not have any dead
letter queue, and do <b>not</b> handle exceptions by default.</p>
+<p>The <a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a> is the default error
handler in Camel. Unlike <a shape="rect" href="dead-letter-channel.html"
title="Dead Letter Channel">Dead Letter Channel</a> it does not have any dead
letter queue, and do <b>not</b> handle exceptions by default.</p>
<h4><a shape="rect" name="ErrorHandler-DeadLetterChannel"></a><a shape="rect"
href="dead-letter-channel.html" title="Dead Letter Channel">Dead Letter
Channel</a></h4>
-<p>The <a shape="rect" href="dead-letter-channel.html" title="Dead Letter
Channel">Dead Letter Channel</a> is the default error handler in Camel 1.x,
which is automatically configured for you. By default Camel will redeliver at
most 6 times using 1 second delay, and if the exchange failed it will be logged
at ERROR level.</p>
+<p>The <a shape="rect" href="dead-letter-channel.html" title="Dead Letter
Channel">Dead Letter Channel</a> will redeliver at most 6 times using 1 second
delay, and if the exchange failed it will be logged at ERROR level.</p>
<p>You can configure the default dead letter endpoint to use:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
@@ -127,6 +121,29 @@ So if you are using transacted routes th
</pre>
</div></div>
+<p>or in Spring DSL</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
+<pre class="code-xml">
+<span class="code-tag"><bean id=<span
class="code-quote">"deadLetterErrorHandler"</span> class=<span
class="code-quote">"org.apache.camel.builder.DeadLetterChannelBuilder"</span>></span>
+ <span class="code-tag"><property name=<span
class="code-quote">"deadLetterUri"</span> value=<span
class="code-quote">"log:dead"</span>/></span>
+<span class="code-tag"></bean></span>
+
+<span class="code-tag"><camelContext errorHandlerRef=<span
class="code-quote">"deadLetterErrorHandler"</span> xmlns=<span
class="code-quote">"http://camel.apache.org/schema/spring"</span>></span>
+ ...
+<span class="code-tag"></camelContext></span>
+</pre>
+</div></div>
+<p>or also from <b>Camel 2.3.0 onwards</b></p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
+<pre class="code-xml">
+<span class="code-tag"><camel:errorHandler id=<span
class="code-quote">"deadLetterErrorHandler"</span> type=<span
class="code-quote">"DeadLetterChannel"</span> deadLetterUri=<span
class="code-quote">"log:dead"</span>></span>
+
+<span class="code-tag"><camel:camelContext errorHandlerRef=<span
class="code-quote">"deadLetterErrorHandler"</span>></span>
+ ...
+<span class="code-tag"></camel:camelContext></span>
+</pre>
+</div></div>
+
<h4><a shape="rect" name="ErrorHandler-LoggingErrorHandler"></a>Logging Error
Handler</h4>
<p>The logging error handler will log (by default at ERROR level) whenever an
uncaught exception is thrown. The logging category, logger and level may all be
defined in the builder.</p>
@@ -136,6 +153,29 @@ So if you are using transacted routes th
errorHandler(loggingErrorHandler(<span
class="code-quote">"mylogger.name"</span>).level(LoggingLevel.INFO));
</pre>
</div></div>
+<p>or in Spring DSL</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
+<pre class="code-xml">
+<span class="code-tag"><bean id=<span
class="code-quote">"loggingErrorHandler"</span> class=<span
class="code-quote">"org.apache.camel.builder.LoggingErrorHandler"</span>></span>
+ <span class="code-tag"><property name=<span
class="code-quote">"logName"</span> value=<span
class="code-quote">"mylogger.name"</span>/></span>
+ <span class="code-tag"><property name=<span
class="code-quote">"level"</span> value=<span
class="code-quote">"DEBUG"</span>/></span>
+<span class="code-tag"></bean></span>
+
+<span class="code-tag"><camelContext errorHandlerRef=<span
class="code-quote">"loggingErrorHandler"</span> xmlns=<span
class="code-quote">"http://camel.apache.org/schema/spring"</span>></span>
+ ...
+<span class="code-tag"></camelContext></span>
+</pre>
+</div></div>
+<p>or also from <b>Camel 2.3.0 onwards</b></p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
+<pre class="code-xml">
+<span class="code-tag"><camel:errorHandler id=<span
class="code-quote">"loggingErrorHandler"</span> type=<span
class="code-quote">"LoggingErrorHandler"</span> logName=<span
class="code-quote">"mylogger.name"</span> level=<span
class="code-quote">"DEBUG"</span>/></span>
+
+<span class="code-tag"><camel:camelContext errorHandlerRef=<span
class="code-quote">"loggingErrorHandler"</span>></span>
+ ...
+<span class="code-tag"></camel:camelContext></span>
+</pre>
+</div></div>
<p>This would create an error handler which logs exceptions using the category
mylogger.name and uses the level INFO for all log messages created.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
@@ -154,15 +194,34 @@ from(<span class="code-quote">"seda:a"</
errorHandler(noErrorHandler());
</pre>
</div></div>
+<p>or in Spring DSL</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
+<pre class="code-xml">
+<span class="code-tag"><bean id=<span
class="code-quote">"noErrorHandler"</span> class=<span
class="code-quote">"org.apache.camel.builder.NoErrorHandlerBuilder"</span>/></span>
+
+<span class="code-tag"><camelContext errorHandlerRef=<span
class="code-quote">"noErrorHandler"</span> xmlns=<span
class="code-quote">"http://camel.apache.org/schema/spring"</span>></span>
+ ...
+<span class="code-tag"></camelContext></span>
+</pre>
+</div></div>
+<p>or also from <b>Camel 2.3.0 onwards</b></p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
+<pre class="code-xml">
+<span class="code-tag"><camel:errorHandler id=<span
class="code-quote">"noErrorHandler"</span> type=<span
class="code-quote">"NoErrorHandler"</span>/></span>
+
+<span class="code-tag"><camel:camelContext errorHandlerRef=<span
class="code-quote">"noErrorHandler"</span>></span>
+ ...
+<span class="code-tag"></camel:camelContext></span>
+</pre>
+</div></div>
-<h4><a shape="rect"
name="ErrorHandler-TransactionErrorHandlernewinCamel2.0"></a><a shape="rect"
href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> new in Camel
2.0</h4>
+<h4><a shape="rect" name="ErrorHandler-TransactionErrorHandler"></a><a
shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a></h4>
-<p>The <a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> is the new default
error handler in Camel 2.0 for transacted routes. </p>
+<p>The <a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> is the default
error handler in Camel for transacted routes. </p>
<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">If
you have marked a route as transacted using the <b>transacted</b> DSL then
Camel will automatic use a <a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a>. It will try to
lookup the global/per route configured error handler and use it if its a
<tt>TransactionErrorHandlerBuilder</tt> instance. If not Camel will automatic
create a temporary <a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> that overrules the
default error handler. This is convention over
configuration.</td></tr></table></div>
<h3><a shape="rect"
name="ErrorHandler-FeaturessupportbyvariousErrorHandlers"></a>Features support
by various <a shape="rect" href="error-handler.html" title="Error
Handler">Error Handler</a>s</h3>
-<p>In Camel 1.x the <a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> only supports the
<b>all scopes</b> feature. In Camel 2.0 we have redone it to be based on the
same core class as the <a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a> and hence why it supports
the same feature set as this.</p>
<p>Here is a breakdown of which features is supported by the <a shape="rect"
href="error-handler.html" title="Error Handler">Error Handler</a>(s):</p>
<div class="table-wrap">
@@ -211,11 +270,10 @@ errorHandler(noErrorHandler());
<h3><a shape="rect" name="ErrorHandler-Springbasedconfiguration"></a>Spring
based configuration</h3>
-<p><b>Available as of Camel 1.4</b></p>
<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1"
rowspan="1"><b>Java DSL vs. Spring DSL</b><br clear="none">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.</td></tr></table></div>
-<p>In Camel 1.4 the error handler can be configured as a spring bean and
scoped in:</p>
+<p>The error handler can be configured as a spring bean and scoped in:</p>
<ul class="alternate" type="square"><li>global (the camelContext
tag)</li><li>per route (the route tag)</li><li>or per policy (the
policy/transacted tag)</li></ul>
@@ -294,11 +352,11 @@ And finally we have another spring bean
<h3><a shape="rect"
name="ErrorHandler-Usingthetransactionalerrorhandler"></a>Using the
transactional error handler</h3>
-<p>The transactional error handler is introduced in Camel 1.4 and is based on
spring transaction. This requires the usage of the camel-spring component.<br
clear="none">
+<p>The transactional error handler is based on spring transaction. This
requires the usage of the camel-spring component.<br clear="none">
See <a shape="rect" href="transactional-client.html" title="Transactional
Client">Transactional Client</a> that has many samples for how to use and
transactional behavior and configuration with this error handler.</p>
<h3><a shape="rect" name="ErrorHandler-Seealso"></a>See also</h3>
-<ul class="alternate" type="square"><li><a shape="rect"
href="error-handling-in-camel.html" title="Error handling in Camel">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"
title="Dead Letter Channel">Dead Letter Channel</a> for the default error
handler in Camel 1.x</li><li><a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a> for the default error
handler in Camel 2.0 onwards</li><li><a shape="rect"
href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> for the default
error handler for transacted routes in Camel 2.0 onwards</li><li><a
shape="rect" href="transactional-client.html" title="Transactional
Client">Transactional Client</a> for transactional behavior</li><li><a
shape="rect" href="exception-clause.html" title="Exception Clause">Exception
Clause</a> as it supports <b>handling</b
> thrown exceptions</li><li><a shape="rect" href="try-catch-finally.html"
> title="Try Catch Finally">Try Catch Finally</a> for try ... catch ...
> finally as DSL you can use in the routing</li></ul>
+<ul class="alternate" type="square"><li><a shape="rect"
href="error-handling-in-camel.html" title="Error handling in Camel">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"
title="Dead Letter Channel">Dead Letter Channel</a> for the dead letter error
handler</li><li><a shape="rect" href="defaulterrorhandler.html"
title="DefaultErrorHandler">DefaultErrorHandler</a> for the default error
handler in Camel</li><li><a shape="rect" href="transactionerrorhandler.html"
title="TransactionErrorHandler">TransactionErrorHandler</a> for the default
error handler for transacted routes</li><li><a shape="rect"
href="transactional-client.html" title="Transactional Client">Transactional
Client</a> for transactional behavior</li><li><a shape="rect"
href="exception-clause.html" title="Exception Clause">Exception Clause</a> as
it supports <b>handling</b> thrown exceptions</li><li><a shape="rect
" href="try-catch-finally.html" title="Try Catch Finally">Try Catch
Finally</a> for try ... catch ... finally as DSL you can use in the
routing</li></ul>
</div>
</td>
<td valign="top">