You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2014/04/08 09:36:36 UTC

svn commit: r905427 - in /websites/production/camel/content: advanced-configuration-of-camelcontext-using-spring.html cache/main.pageCache logeip.html

Author: buildbot
Date: Tue Apr  8 07:36:36 2014
New Revision: 905427

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/advanced-configuration-of-camelcontext-using-spring.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/logeip.html

Modified: websites/production/camel/content/advanced-configuration-of-camelcontext-using-spring.html
==============================================================================
--- websites/production/camel/content/advanced-configuration-of-camelcontext-using-spring.html (original)
+++ websites/production/camel/content/advanced-configuration-of-camelcontext-using-spring.html Tue Apr  8 07:36:36 2014
@@ -86,7 +86,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="AdvancedconfigurationofCamelContextusingSpring-AdvancedconfigurationofCamelContextusingSpring">Advanced configuration of CamelContext using Spring</h2><p>When using Spring the CamelContext can be pre configured based on defined beans in spring XML.<br clear="none"> This wiki page documentes these features. Most of these features requires <strong>Camel 2.0</strong>.</p><h3 id="AdvancedconfigurationofCamelContextusingSpring-Whatcanbeconfigured">What can be configured</h3><p>The following functions can be configured:</p><ul class="alternate"><li>Class resolvers</li><li>Lifecycle factories</li><li>Registry for lookup</li><li><a shape="rect" href="debugger.html">Debugger</a>, <a shape="rect" href="tracer.html">Tracer</a>, <a shape="rect" href="delay-interceptor.html">Delay</a> and <a shape="rect" href="uuidgenerator.html">UuidGenerator</a></li><li><a shape="rect" href="intercept.html">Intercept</a></li><li><a shape="rect" href="graceful-shutd
 own.html">Graceful Shutdown</a></li><li><a shape="rect" href="stream-caching.html">Stream caching</a></li></ul><p>Camel will configure these functions by doing a lookup in the Spring bean registry to find beans of the given type<br clear="none"> When Camel finds and uses any of these it logs at <code>INFO</code> level.</p><p>The following list all requires at most 1 beans defined. If there are more than 1 bean of this type, then Camel will <strong>not</strong> use it.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Number of beans</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>PackageScanClassResolver</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party package scan
  resolver. More details at <a shape="rect" href="pluggable-class-resolvers.html">Pluggable Class Resolvers</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ClassResolver</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party class resolver. More details at <a shape="rect" href="pluggable-class-resolvers.html">Pluggable Class Resolvers</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>FactoryFinderResolver</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party factory finder.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Registry</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party bean registry. By default Camel will use Spring ApplicationContext a
 s registry.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Debugger</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a <a shape="rect" href="debugger.html">Debugger</a> usually for tooling.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Tracer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party <a shape="rect" href="tracer.html">Tracer</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>TraceFormatter</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a bean that has the tracing options configured.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>HandleFault</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" r
 owspan="1" class="confluenceTd"><p>To use a 3rd part fault handler to handle FAULT messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Delayer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd part <a shape="rect" href="delayer.html">Delayer</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ManagementStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part strategy for <a shape="rect" href="camel-jmx.html">management</a>, for example JMX management.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ManagementNamingStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> To use a 3rd part strategy for nam
 ing MBeans for <a shape="rect" href="camel-jmx.html">management</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>NodeIdFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To use a 3rd part node id factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>EventFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part event factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>EventNotifier</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part event notifier. In Camel 2.2 onwards you can have multiple notifiers, see next table.</p></td></tr><tr><td colspan="1" rowspan="1" cla
 ss="confluenceTd"><p>InflightRepository</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part inflight repository.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ShutdownStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> To use a 3rd part shutdown strategy.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ExecutorServiceStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3 - 2.8.x:</strong> To use a 3rd part executor service strategy. More details at <a shape="rect" href="threading-model.html">Threading Model</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ExecutorServiceManager</p></td><td colsp
 an="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> To use a 3rd part executor service manager. More details at <a shape="rect" href="threading-model.html">Threading Model</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ThreadPoolFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> To use a 3rd part thread pool factory. More details at <a shape="rect" href="threading-model.html">Threading Model</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ProcessorFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> To use a 3rd part processor factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>UuidGenerator</p></td><td colsp
 an="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> To use a 3rd part <a shape="rect" href="uuidgenerator.html">UuidGenerator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>StreamCachingStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> To use a 3rd part <a shape="rect" href="stream-caching.html">Stream caching</a> strategy.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>UnitOfWorkFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.3/2.13:</strong> To use 3rd part <code>UnitOfWork</code> implementations created by the factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">RuntimeEndpointRegistry</td><td colspan="1" rowspan="
 1" class="confluenceTd">0..1</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.13.1:</strong> To use a 3rd party RuntimeEndpointRegistry implementation.</td></tr></tbody></table></div><p>And the following options have support for any number of beans defined.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Number of beans</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>InterceptStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..n</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use your own <a shape="rect" href="intercept.html">Intercept</a> that intercepts every processing steps in all routes in the <a shape="rect" href="camelcontext.html">CamelContext</a>. For instance you can use this to do an AOP lik
 e performance timer interceptor.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>LifecycleStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..n</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use 3rd party lifecycle strategies. By default Camel uses a JMX aware that does JMX instrumentation.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>EventNotifier</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..n</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> To use 3rd part event notifiers.</p></td></tr></tbody></table></div><p>Camel will log at <code>INFO</code> level if it pickup and uses a custom bean using <code>org.apache.camel.spring.CamelContextFactoryBean</code> as name.</p><h3 id="AdvancedconfigurationofCamelContextusingSpring-Usingcontainerwideinterceptors">Using container wide interceptors</h3><p>Imagine that you have multip
 le <a shape="rect" href="camelcontext.html">CamelContext</a> and you want to configure that they all use the same container wide interceptor. How do we do that? Well we can leverage the fact that Camel can auto detect and use custom interceptors. So what we simply do is to define our interceptor in the spring xml file. The sample below does this and also define 2 camel contexts. The sample is based on unit test.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Spring DSL</b></div><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h2 id="AdvancedconfigurationofCamelContextusingSpring-AdvancedconfigurationofCamelContextusingSpring">Advanced configuration of CamelContext using Spring</h2><p>When using Spring the CamelContext can be pre configured based on defined beans in spring XML.<br clear="none"> This wiki page documentes these features. Most of these features requires <strong>Camel 2.0</strong>.</p><h3 id="AdvancedconfigurationofCamelContextusingSpring-Whatcanbeconfigured">What can be configured</h3><p>The following functions can be configured:</p><ul class="alternate"><li>Class resolvers</li><li>Lifecycle factories</li><li>Registry for lookup</li><li><a shape="rect" href="debugger.html">Debugger</a>, <a shape="rect" href="tracer.html">Tracer</a>, <a shape="rect" href="delay-interceptor.html">Delay</a> and <a shape="rect" href="uuidgenerator.html">UuidGenerator</a></li><li><a shape="rect" href="intercept.html">Intercept</a></li><li><a shape="rect" href="graceful-shutd
 own.html">Graceful Shutdown</a></li><li><a shape="rect" href="stream-caching.html">Stream caching</a></li><li>Logging</li></ul><p>Camel will configure these functions by doing a lookup in the Spring bean registry to find beans of the given type<br clear="none"> When Camel finds and uses any of these it logs at <code>INFO</code> level.</p><p>The following list all requires at most 1 beans defined. If there are more than 1 bean of this type, then Camel will <strong>not</strong> use it.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Number of beans</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>PackageScanClassResolver</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd pa
 rty package scan resolver. More details at <a shape="rect" href="pluggable-class-resolvers.html">Pluggable Class Resolvers</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ClassResolver</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party class resolver. More details at <a shape="rect" href="pluggable-class-resolvers.html">Pluggable Class Resolvers</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>FactoryFinderResolver</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party factory finder.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Registry</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party bean registry. By default Camel will use Spring Appl
 icationContext as registry.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Debugger</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a <a shape="rect" href="debugger.html">Debugger</a> usually for tooling.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Tracer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd party <a shape="rect" href="tracer.html">Tracer</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>TraceFormatter</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a bean that has the tracing options configured.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>HandleFault</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><
 td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd part fault handler to handle FAULT messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Delayer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a 3rd part <a shape="rect" href="delayer.html">Delayer</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ManagementStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part strategy for <a shape="rect" href="camel-jmx.html">management</a>, for example JMX management.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ManagementNamingStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> To use a 3rd part 
 strategy for naming MBeans for <a shape="rect" href="camel-jmx.html">management</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>NodeIdFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To use a 3rd part node id factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>EventFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part event factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>EventNotifier</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part event notifier. In Camel 2.2 onwards you can have multiple notifiers, see next table.</p></td></tr><tr><td colspan="1"
  rowspan="1" class="confluenceTd"><p>InflightRepository</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use a 3rd part inflight repository.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ShutdownStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> To use a 3rd part shutdown strategy.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ExecutorServiceStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3 - 2.8.x:</strong> To use a 3rd part executor service strategy. More details at <a shape="rect" href="threading-model.html">Threading Model</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ExecutorServiceManager</
 p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> To use a 3rd part executor service manager. More details at <a shape="rect" href="threading-model.html">Threading Model</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ThreadPoolFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> To use a 3rd part thread pool factory. More details at <a shape="rect" href="threading-model.html">Threading Model</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ProcessorFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> To use a 3rd part processor factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>UuidGenerator</
 p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> To use a 3rd part <a shape="rect" href="uuidgenerator.html">UuidGenerator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>StreamCachingStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> To use a 3rd part <a shape="rect" href="stream-caching.html">Stream caching</a> strategy.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>UnitOfWorkFactory</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.3/2.13:</strong> To use 3rd part <code>UnitOfWork</code> implementations created by the factory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">RuntimeEndpointRegistry</td><td colsp
 an="1" rowspan="1" class="confluenceTd">0..1</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.13.1:</strong> To use a 3rd party RuntimeEndpointRegistry implementation.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Logger</td><td colspan="1" rowspan="1" class="confluenceTd">0..1</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.12.4/2.13.1:</strong> To use provided org.slf4j.Logger for <a shape="rect" href="log.html">Log</a> component and <a shape="rect" href="logeip.html">log() EIP</a>.</td></tr></tbody></table></div><p>And the following options have support for any number of beans defined.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Number of beans</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>I
 nterceptStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..n</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use your own <a shape="rect" href="intercept.html">Intercept</a> that intercepts every processing steps in all routes in the <a shape="rect" href="camelcontext.html">CamelContext</a>. For instance you can use this to do an AOP like performance timer interceptor.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>LifecycleStrategy</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..n</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong> To use 3rd party lifecycle strategies. By default Camel uses a JMX aware that does JMX instrumentation.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>EventNotifier</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>0..n</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> To use 3r
 d part event notifiers.</p></td></tr></tbody></table></div><p>Camel will log at <code>INFO</code> level if it pickup and uses a custom bean using <code>org.apache.camel.spring.CamelContextFactoryBean</code> as name.</p><h3 id="AdvancedconfigurationofCamelContextusingSpring-Usingcontainerwideinterceptors">Using container wide interceptors</h3><p>Imagine that you have multiple <a shape="rect" href="camelcontext.html">CamelContext</a> and you want to configure that they all use the same container wide interceptor. How do we do that? Well we can leverage the fact that Camel can auto detect and use custom interceptors. So what we simply do is to define our interceptor in the spring xml file. The sample below does this and also define 2 camel contexts. The sample is based on unit test.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Spring DSL</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 
 &lt;!-- here we define a spring bean that is our container wide interceptor

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/logeip.html
==============================================================================
--- websites/production/camel/content/logeip.html (original)
+++ websites/production/camel/content/logeip.html Tue Apr  8 07:36:36 2014
@@ -85,108 +85,66 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="LogEIP-Log">Log</h2>
-
-<p>How can I log processing a <a shape="rect" href="message.html">Message</a>?</p>
-
-<p>Camel provides many ways to log processing a message. Here is just some examples:</p>
-<ul class="alternate"><li>You can use the <a shape="rect" href="log.html">Log</a> component which logs the Message content.</li><li>You can use the <a shape="rect" href="tracer.html">Tracer</a> which trace logs message flow.</li><li>You can also use a <a shape="rect" href="processor.html">Processor</a> or <a shape="rect" href="bean.html">Bean</a> and log from Java code.</li><li>You can use the <code>log</code> DSL.</li></ul>
-
-
-<h3 id="LogEIP-UsinglogDSL">Using log DSL</h3>
-
-<p>And in <strong>Camel 2.2</strong> you can use the <code>log</code> DSL which allows you to use <a shape="rect" href="simple.html">Simple</a> language to construct a dynamic message which gets logged.<br clear="none">
-For example you can do</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:start&quot;).log(&quot;Processing ${id}&quot;).to(&quot;bean:foo&quot;);
+<div class="wiki-content maincontent"><h2 id="LogEIP-Log">Log</h2><p>How can I log processing a <a shape="rect" href="message.html">Message</a>?</p><p>Camel provides many ways to log processing a message. Here is just some examples:</p><ul class="alternate"><li>You can use the <a shape="rect" href="log.html">Log</a> component which logs the Message content.</li><li>You can use the <a shape="rect" href="tracer.html">Tracer</a> which trace logs message flow.</li><li>You can also use a <a shape="rect" href="processor.html">Processor</a> or <a shape="rect" href="bean.html">Bean</a> and log from Java code.</li><li>You can use the <code>log</code> DSL.</li></ul><h3 id="LogEIP-UsinglogDSL">Using log DSL</h3><p>And in <strong>Camel 2.2</strong> you can use the <code>log</code> DSL which allows you to use <a shape="rect" href="simple.html">Simple</a> language to construct a dynamic message which gets logged.<br clear="none"> For example you can do</p><div class="code panel pdl" style="border
 -width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;).log(&quot;Processing ${id}&quot;).to(&quot;bean:foo&quot;);
 ]]></script>
-</div></div>
-
-<p>Which will construct a String message at runtime using the <a shape="rect" href="simple.html">Simple</a> language. The log message will by logged at <code>INFO</code> level using the route id as the log name. By default a route is named <code>route-1</code>, <code>route-2</code> etc. But you can use the <code>routeId("myCoolRoute")</code> to set a route name of choice.</p>
-
-    <div class="aui-message hint shadowed information-macro">
+</div></div><p>Which will construct a String message at runtime using the <a shape="rect" href="simple.html">Simple</a> language. The log message will by logged at <code>INFO</code> level using the route id as the log name. By default a route is named <code>route-1</code>, <code>route-2</code> etc. But you can use the <code>routeId("myCoolRoute")</code> to set a route name of choice.</p>    <div class="aui-message hint shadowed information-macro">
                     <p class="title">Difference between log in the DSL and [Log] component</p>
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
-                            
-<p>The <code>log</code> DSL is much lighter and meant for logging human logs such as <code>Starting to do ...</code> etc. It can only log a message based on the <a shape="rect" href="simple.html">Simple</a> language. On the other hand <a shape="rect" href="log.html">Log</a> component is a full fledged component which involves using endpoints and etc. The <a shape="rect" href="log.html">Log</a> component is meant for logging the Message itself and you have many URI options to control what you would like to be logged.</p>
+                            <p>The <code>log</code> DSL is much lighter and meant for logging human logs such as <code>Starting to do ...</code> etc. It can only log a message based on the <a shape="rect" href="simple.html">Simple</a> language. On the other hand <a shape="rect" href="log.html">Log</a> component is a full fledged component which involves using endpoints and etc. The <a shape="rect" href="log.html">Log</a> component is meant for logging the Message itself and you have many URI options to control what you would like to be logged.</p>
                     </div>
     </div>
- 
-
     <div class="aui-message success shadowed information-macro">
                     <p class="title">Logging message body with streamed messages</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>If the message body is stream based, then logging the message body, may cause the message body to be <em>empty</em> afterwards. See this <a shape="rect" href="why-is-my-message-body-empty.html">FAQ</a>. For streamed messages you can use <a shape="rect" href="stream-caching.html">Stream Caching</a> to allow logging the message body and be able to read the message body afterwards again.</p>
+                            <p>If the message body is stream based, then logging the message body, may cause the message body to be <em>empty</em> afterwards. See this <a shape="rect" href="why-is-my-message-body-empty.html">FAQ</a>. For streamed messages you can use <a shape="rect" href="stream-caching.html">Stream caching</a> to allow logging the message body and be able to read the message body afterwards again.</p>
                     </div>
     </div>
-
-
-<p>The log DSL have overloaded methods to set the logging level and/or name as well.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:start&quot;).log(LoggingLevel.DEBUG, &quot;Processing ${id}&quot;).to(&quot;bean:foo&quot;);
+<p>The log DSL have overloaded methods to set the logging level and/or name as well.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;).log(LoggingLevel.DEBUG, &quot;Processing ${id}&quot;).to(&quot;bean:foo&quot;);
 ]]></script>
-</div></div>
-
-<p>and to set a logger name</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:start&quot;).log(LoggingLevel.DEBUG, &quot;com.mycompany.MyCoolRoute&quot;, &quot;Processing ${id}&quot;).to(&quot;bean:foo&quot;);
+</div></div><p>and to set a logger name</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;).log(LoggingLevel.DEBUG, &quot;com.mycompany.MyCoolRoute&quot;, &quot;Processing ${id}&quot;).to(&quot;bean:foo&quot;);
 ]]></script>
-</div></div>
-
-<p>For example you can use this to log the file name being processed if you consume files.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;file://target/files&quot;).log(LoggingLevel.DEBUG, &quot;Processing file ${file:name}&quot;).to(&quot;bean:foo&quot;);
+</div></div><p>Since <strong>Camel 2.12.4/2.13.1</strong> the logger instance may be used as well:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;).log(LoggingLeven.DEBUG, org.slf4j.LoggerFactory.getLogger(&quot;com.mycompany.mylogger&quot;), &quot;Processing ${id}&quot;).to(&quot;bean:foo&quot;);]]></script>
+</div></div><p>For example you can use this to log the file name being processed if you consume files.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;file://target/files&quot;).log(LoggingLevel.DEBUG, &quot;Processing file ${file:name}&quot;).to(&quot;bean:foo&quot;);
 ]]></script>
-</div></div>
-
-<h4 id="LogEIP-UsinglogDSLfromSpring">Using log DSL from Spring</h4>
-<p>In Spring DSL its also easy to use log DSL as shown below:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-        &lt;route id=&quot;foo&quot;&gt;
+</div></div><h4 id="LogEIP-UsinglogDSLfromSpring">Using log DSL from Spring</h4><p>In Spring DSL its also easy to use log DSL as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[        &lt;route id=&quot;foo&quot;&gt;
             &lt;from uri=&quot;direct:foo&quot;/&gt;
             &lt;log message=&quot;Got ${body}&quot;/&gt;
             &lt;to uri=&quot;mock:foo&quot;/&gt;
         &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<p>The log tag has attributes to set the <code>message</code>, <code>loggingLevel</code> and <code>logName</code>. For example:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-        &lt;route id=&quot;baz&quot;&gt;
+</div></div><p>The log tag has attributes to set the <code>message</code>, <code>loggingLevel</code> and <code>logName</code>. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[        &lt;route id=&quot;baz&quot;&gt;
             &lt;from uri=&quot;direct:baz&quot;/&gt;
             &lt;log message=&quot;Me Got ${body}&quot; loggingLevel=&quot;FATAL&quot; logName=&quot;com.mycompany.MyCoolRoute&quot;/&gt;
             &lt;to uri=&quot;mock:baz&quot;/&gt;
         &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<h4 id="LogEIP-Usingslf4jMarker">Using slf4j Marker</h4>
-<p><strong>Available as of Camel 2.9</strong></p>
-
-<p>You can specify a marker name in the DSL</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-        &lt;route id=&quot;baz&quot;&gt;
-            &lt;from uri=&quot;direct:baz&quot;/&gt;
-            &lt;log message=&quot;Me Got ${body}&quot; loggingLevel=&quot;FATAL&quot; logName=&quot;com.mycompany.MyCoolRoute&quot; marker=&quot;myMarker&quot;/&gt;
+</div></div><p>Since&#160;<strong>Camel 2.12.4/2.13.1</strong> it is possible to reference logger instance. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[        &lt;bean id=&quot;myLogger&quot; class=&quot;org.slf4j.LoggerFactory&quot; factory-method=&quot;getLogger&quot; xmlns=&quot;http://www.springframework.org/schema/beans&quot;&gt;
+            &lt;constructor-arg value=&quot;com.mycompany.mylogger&quot; /&gt;
+        &lt;/bean&gt;
+
+        &lt;route id=&quot;moo&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+            &lt;from uri=&quot;direct:moo&quot;/&gt;
+            &lt;log message=&quot;Me Got ${body}&quot; loggingLevel=&quot;INFO loggerRef=&quot;myLogger&quot;/&gt;
             &lt;to uri=&quot;mock:baz&quot;/&gt;
         &lt;/route&gt;
 ]]></script>
-</div></div>
-
-
-<h4 id="LogEIP-UsingThisPattern">Using This Pattern</h4>
+</div></div><h4 id="LogEIP-Usingslf4jMarker">Using slf4j Marker</h4><p><strong>Available as of Camel 2.9</strong></p><p>You can specify a marker name in the DSL</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[        &lt;route id=&quot;baz&quot;&gt;
+            &lt;from uri=&quot;direct:baz&quot;/&gt;
+            &lt;log message=&quot;Me Got ${body}&quot; loggingLevel=&quot;FATAL&quot; logName=&quot;com.mycompany.MyCoolRoute&quot; marker=&quot;myMarker&quot;/&gt;
+            &lt;to uri=&quot;mock:baz&quot;/&gt;
+        &lt;/route&gt;]]></script>
+</div></div><h4 id="LogEIP-UsinglogDSLinOSGi">Using log DSL in OSGi</h4><p><strong>Improvement as of Camel 2.12.4/2.13.1</strong></p><p>When using log DSL inside OSGi (e.g., in Karaf), the underlying logging mechanisms are provided by PAX logging. It searches for a bundle which invokes&#160;<code>org.slf4j.LoggerFactory.getLogger()</code> method and associates the bundle with the logger instance. Passing only logger name to log DSL results in associating&#160;<code>camel-core</code> bundle with the logger instance created.</p><p>In some scenarios it is required that the bundle associated with logger should be the bundle which contains route definition. This is possible using provided logger instance both for Java DSL and Spring DSL (see the examples above).</p><p></p><h4 id="LogEIP-UsingThisPattern">Using This Pattern</h4>
 
 <p>If you would like to use this EIP Pattern then please read the <a shape="rect" href="getting-started.html">Getting Started</a>, you may also find the <a shape="rect" href="architecture.html">Architecture</a> useful particularly the description of <a shape="rect" href="endpoint.html">Endpoint</a> and <a shape="rect" href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" href="examples.html">Examples</a> first before trying this pattern out.</p></div>
         </td>