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 2016/02/10 11:19:27 UTC

svn commit: r980012 - in /websites/production/camel/content: cache/main.pageCache cdi.html

Author: buildbot
Date: Wed Feb 10 10:19:27 2016
New Revision: 980012

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/cdi.html

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

Modified: websites/production/camel/content/cdi.html
==============================================================================
--- websites/production/camel/content/cdi.html (original)
+++ websites/production/camel/content/cdi.html Wed Feb 10 10:19:27 2016
@@ -86,7 +86,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="CDI-CamelCDI">Camel CDI</h2><p>The Camel CDI component provides auto-configuration for Apache Camel using CDI as dependency injection framework based on&#160;<em>convention-over-configuration</em>. It auto-detects Camel routes available in the application and provides beans for common Camel primitives like <code>Endpoint</code>,&#160;<code>ProducerTemplate</code> or&#160;<code>TypeConverter</code>. It implements standard <a shape="rect" href="bean-integration.html">Camel bean integration</a> so that Camel annotations like&#160;<code>@Consume</code>,&#160;<code>@Produce</code> and&#160;<span style="color: rgb(0,0,0);"><code>@PropertyInject</code> can be used seamlessly in CDI beans</span>. Besides, it bridges Camel events (e.g. <code>RouteAddedEvent</code>, <code>CamelContextStartedEvent</code>,&#160;<code>ExchangeCompletedEvent</code>, ...) as CDI events and provides a CDI events endpoint that can be used to consume / produce CDI events 
 from / to Camel routes.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>While the Camel CDI component is available as of Camel 2.10, it's been rewritten in Camel 2.17 to better fit into the CDI programming model. Hence some of the features like the Camel events to CDI events bridge and the CDI events endpoint only apply starting Camel 2.17.</p></div></div><h3 id="CDI-Auto-configuredCamelcontext">Auto-configured Camel context</h3><p>Camel CDI automatically deploys and configures a&#160;<code>CamelContext</code> bean. That <code>CamelContext</code> bean is automatically instantiated, configured and started (resp. stopped) when the CDI container initialises (resp. shuts down). It can be injected in the application, e.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent pa
 nelContent pdl">
+<div class="wiki-content maincontent"><h2 id="CDI-CamelCDI">Camel CDI</h2><p>The Camel CDI component provides auto-configuration for Apache Camel using CDI as dependency injection framework based on&#160;<em>convention-over-configuration</em>. It auto-detects Camel routes available in the application and provides beans for common Camel primitives like <code>Endpoint</code>,&#160;<code>ProducerTemplate</code> or&#160;<code>TypeConverter</code>. It implements standard <a shape="rect" href="bean-integration.html">Camel bean integration</a> so that Camel annotations like&#160;<code>@Consume</code>,&#160;<code>@Produce</code> and&#160;<span style="color: rgb(0,0,0);"><code>@PropertyInject</code> can be used seamlessly in CDI beans</span>. Besides, it bridges Camel events (e.g. <code>RouteAddedEvent</code>, <code>CamelContextStartedEvent</code>,&#160;<code>ExchangeCompletedEvent</code>, ...) as CDI events and provides a CDI events endpoint that can be used to consume / produce CDI events 
 from / to Camel routes.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>While the Camel CDI component is available as of <strong>Camel 2.10</strong>, it's been rewritten in <strong>Camel 2.17</strong> to better fit into the CDI programming model. Hence some of the features like the Camel events to CDI events bridge and the CDI events endpoint only apply starting Camel 2.17.</p></div></div><h3 id="CDI-Auto-configuredCamelcontext">Auto-configured Camel context</h3><p>Camel CDI automatically deploys and configures a&#160;<code>CamelContext</code> bean. That <code>CamelContext</code> bean is automatically instantiated, configured and started (resp. stopped) when the CDI container initialises (resp. shuts down). It can be injected in the application, e.g.:</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[@Inject
 CamelContext context;]]></script>
 </div></div><p>That default <code>CamelContext</code> bean is qualified with the built-in&#160;<code>@Default</code> qualifier, is scoped&#160;<code>@ApplicationScoped</code> and is of type <code>DefaultCamelContext</code>.</p><p>Note that this bean can be customised programmatically and other Camel context beans can be deployed in the application as well.</p><h3 id="CDI-Auto-detectingCamelroutes">Auto-detecting Camel routes</h3><p>Camel CDI automatically&#160;collects all the&#160;<code>RoutesBuilder</code> beans in the application, instantiates and add them to the <code>CamelContext</code> bean instance when the CDI container initialises. For example, adding a Camel route is as simple as declaring a class, e.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -106,7 +106,7 @@ class MyRouteBean extends RoutesBuilder
         from(&quot;jms:invoices&quot;).to(&quot;file:/invoices&quot;);
     }
 }]]></script>
-</div></div><p>Else, if more customisation is needed, any&#160;<code>CamelContext</code>&#160;class can be used to declare a custom Camel context bean. Then, the&#160;<code>@PostConstruct</code>&#160;and&#160;<code>@PreDestroy</code>&#160;lifecycle callbacks can be done to do the customisation, e.g.:</p><div class="highlight highlight-source-java"><p>&#160;</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Else, if more customisation is needed, any&#160;<code>CamelContext</code>&#160;class can be used to declare a custom Camel context bean. Then, the&#160;<code>@PostConstruct</code>&#160;and&#160;<code>@PreDestroy</code>&#160;lifecycle callbacks can be done to do the customisation, e.g.:</p><div class="highlight highlight-source-java"><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[@ApplicationScoped
 class CustomCamelContext extends DefaultCamelContext {
 
@@ -123,7 +123,7 @@ class CustomCamelContext extends Default
         // ...
     }
 }]]></script>
-</div></div><p>&#160;</p></div><p><a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#producer_method" rel="nofollow">Producer</a>&#160;and&#160;<a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method" rel="nofollow">disposer</a>&#160;methods can also be used as well to customize the Camel context bean, e.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div></div><p><a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#producer_method" rel="nofollow">Producer</a>&#160;and&#160;<a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method" rel="nofollow">disposer</a>&#160;methods can also be used as well to customize the Camel context bean, e.g.:</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[class CamelContextFactory {
 
     @Produces
@@ -257,13 +257,13 @@ public class MyTypeConverter {
     }
 }]]></script>
 </div></div><p>Note that CDI injection is supported within the type converters.</p><h3 id="CDI-Camelbeanintegration">Camel bean integration</h3><h4 id="CDI-Camelannotations">Camel annotations</h4><p>As part of the Camel&#160;<a shape="rect" class="external-link" href="http://camel.apache.org/bean-integration.html">bean integration</a>,&#160;Camel comes with a set of&#160;<a shape="rect" class="external-link" href="http://camel.apache.org/bean-integration.html#BeanIntegration-Annotations">annotations</a>&#160;that are seamlessly supported by Camel CDI. So you can use any of these annotations in your CDI beans, e.g.:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">&#160;</th><th colspan="1" rowspan="1" class="confluenceTh">Camel annotation</th><th colspan="1" rowspan="1" class="confluenceTh">CDI equivalent</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Configuration property</td><td colspan="1" rowspa
 n="1" class="confluenceTd"><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[@PropertyInject(&quot;property&quot;)
-String property;
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@PropertyInject(&quot;key&quot;)
+String value;
 ]]></script>
 </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If using <a shape="rect" class="external-link" href="http://deltaspike.apache.org/documentation/configuration.html">DeltaSpike configuration mechanism</a>:</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[@Inject
-@ConfigProperty(name = &quot;message&quot;)
-String property;]]></script>
+@ConfigProperty(name = &quot;key&quot;)
+String value;]]></script>
 </div></div><p>See <a shape="rect" href="#CDI-Configurationproperties">configuration properties</a> for more details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Producer template injection (default Camel context)</td><td colspan="1" rowspan="1" class="confluenceTd"><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[@Produce(uri = &quot;mock:outbound&quot;)
 ProducerTemplate producer;]]></script>
@@ -331,7 +331,7 @@ PlatformTransactionManager createTransac
     jtaTransactionManager.afterPropertiesSet();
     return jtaTransactionManager;
 }]]></script>
-</div></div><h3 id="CDI-CameleventstoCDIevents">Camel events to CDI events</h3><p>Camel provides a set of&#160;<a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/event/package-summary.html">management events</a>&#160;that can be subscribed to for listening to Camel context, service, route and exchange events. Camel CDI seamlessly translates these Camel events into CDI events that can be observed using CDI&#160;<a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#observer_methods" rel="nofollow">observer methods</a>, e.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="CDI-CameleventstoCDIevents">Camel events to CDI events</h3><p><strong>Available as of Camel 2.17</strong></p><p>Camel provides a set of&#160;<a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/event/package-summary.html">management events</a>&#160;that can be subscribed to for listening to Camel context, service, route and exchange events. Camel CDI seamlessly translates these Camel events into CDI events that can be observed using CDI&#160;<a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#observer_methods" rel="nofollow">observer methods</a>, e.g.:</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[void onContextStarting(@Observes CamelContextStartingEvent event) {
     // Called before the default Camel context is about to start
 }]]></script>
@@ -343,11 +343,11 @@ PlatformTransactionManager createTransac
 void onContextStarted(@Observes @Manual CamelContextStartedEvent event) {
     // Called after the the Camel context qualified with &#39;@Manual&#39; has started
 }]]></script>
-</div></div><p>Similarly, the&#160;<code>@Default</code>&#160;qualifier can be used to observe Camel events for the&#160;<em>default</em>&#160;Camel context if multiples contexts exist, e.g.:</p><div class="highlight highlight-source-java"><p>&#160;</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Similarly, the&#160;<code>@Default</code>&#160;qualifier can be used to observe Camel events for the&#160;<em>default</em>&#160;Camel context if multiples contexts exist, e.g.:</p><div class="highlight highlight-source-java"><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[void onExchangeCompleted(@Observes @Default ExchangeCompletedEvent event) {
     // Called after the exchange &#39;event.getExchange()&#39; processing has completed
 }]]></script>
-</div></div><p>In that example, if no qualifier is specified, the&#160;<code>@Any</code>&#160;qualifier is implicitly assumed, so that corresponding events for all the Camel contexts get received.</p></div><p>Note that the support for Camel events translation into CDI events is only activated if observer methods listening for Camel events are detected in the deployment, and that per Camel context.</p><h3 id="CDI-CDIeventsendpoint">CDI events endpoint</h3><p>The CDI event endpoint bridges the&#160;<a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events" rel="nofollow">CDI events</a>&#160;with the Camel routes so that CDI events can be seamlessly observed / consumed (resp. produced / fired) from Camel consumers (resp. by Camel producers).</p><p>The&#160;<code>CdiEventEndpoint&lt;T&gt;</code>&#160;bean provided by Camel CDI can be used to observe / consume CDI events whose&#160;<em>event type</em>&#160;is&#160;<code>T</code>, for example:</p>
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>In that example, if no qualifier is specified, the&#160;<code>@Any</code>&#160;qualifier is implicitly assumed, so that corresponding events for all the Camel contexts get received.</p></div><p>Note that the support for Camel events translation into CDI events is only activated if observer methods listening for Camel events are detected in the deployment, and that per Camel context.</p><h3 id="CDI-CDIeventsendpoint">CDI events endpoint</h3><p><strong>Available as of Camel 2.17</strong></p><p>The CDI event endpoint bridges the&#160;<a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events" rel="nofollow">CDI events</a>&#160;with the Camel routes so that CDI events can be seamlessly observed / consumed (resp. produced / fired) from Camel consumers (resp. by Camel producers).</p><p>The&#160;<code>CdiEventEndpoint&lt;T&gt;</code>&#160;bean provided by Camel CDI can be used to observe / consume CDI events whose&#160;<em>event type<
 /em>&#160;is&#160;<code>T</code>, for example:</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[@Inject
 CdiEventEndpoint&lt;String&gt; cdiEventEndpoint;
 
@@ -367,7 +367,7 @@ from(&quot;direct:event&quot;).log(&quot
 CdiEventEndpoint&lt;String&gt; cdiEventEndpoint;
 
 from(&quot;direct:event&quot;).to(cdiEventEndpoint).log(&quot;CDI event sent: ${body}&quot;);]]></script>
-</div></div><p>This is equivalent to writing:</p><div class="highlight highlight-source-java"><p>&#160;</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>This is equivalent to writing:</p><div class="highlight highlight-source-java"><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[@Inject
 Event&lt;String&gt; event;
 
@@ -417,7 +417,7 @@ void observeCdiEvents(@Observes @Context
  camel-cdi      Started                   1              0              0   1 minute  ]]></script>
 </div></div><p>See the&#160;<span><code>camel-example-cdi-osgi</code> example for a working example of the Camel CDI OSGi integration.</span></p><h3 id="CDI-MavenArchetype">Maven Archetype</h3><p>Among the available&#160;<a shape="rect" href="camel-maven-archetypes.html">Camel Maven archetypes</a>, you can use the provided&#160;<code>camel-archetype-cdi</code>&#160;to generate a Camel CDI Maven project, e.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: bash; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-cdi]]></script>
-</div></div><h3 id="CDI-Supportedcontainers">Supported containers</h3><p>The Camel CDI component is compatible with any CDI 1.0, CDI 1.1 and CDI 1.2 compliant runtime. It's been successfully tested against the following runtimes:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Container</th><th colspan="1" rowspan="1" class="confluenceTh">Version</th><th colspan="1" rowspan="1" class="confluenceTh">Runtime</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Weld SE</td><td colspan="1" rowspan="1" class="confluenceTd"><code>1.1.28.Final</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.0 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">OpenWebBeans</td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1.2.7</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.0 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Weld S
 E</td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2.3.2.Final</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">OpenWebBeans</td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1.6.2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">WildFly</td><td colspan="1" rowspan="1" class="confluenceTd"><code>8.2.1.Final</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java EE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">WildFly</td><td colspan="1" rowspan="1" class="confluenceTd"><code>9.0.1.Final</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java EE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Karaf</td><td colspan="1" rowspan="1" class="confluenceTd"><code>2.4.4</code></td><td colspan="1" rowspan=
 "1" class="confluenceTd">CDI 1.2 / <span>OSGi 4 / PAX CDI</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Karaf</td><td colspan="1" rowspan="1" class="confluenceTd"><code>3.0.5</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / <span>OSGi 5 / PAX CDI</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Karaf</td><td colspan="1" rowspan="1" class="confluenceTd"><code>4.0.4</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / <span>OSGi 6 / PAX CDI</span></td></tr></tbody></table></div><h3 id="CDI-Examples">Examples</h3><p>The following examples are available in the <code>examples</code> directory of the Camel project:</p><ul><li><code>camel-example-cdi-metrics</code> - illustrates the integration between Camel, Dropwizard Metrics and CDI,</li><li><code>camel-example-cdi-properties</code> -&#160;illustrates the integration between Camel, DeltaSpike and CDI for configuration properties,</li><li><code>camel-example
 -cdi-osgi</code> - a&#160;CDI application using the SJMS component that can be executed inside an OSGi container using PAX CDI,</li><li><code>camel-example-cdi-rest-servlet</code> -&#160;illustrates the Camel REST DSL being used in a Web application that uses CDI as dependency injection framework,</li><li><code>camel-example-widget-gadget-cdi</code> - The Widget and Gadget use-case from the EIP book implemented in Java with CDI dependency Injection.</li></ul><h3 id="CDI-SeeAlso">See Also</h3><ul><li><a shape="rect" class="external-link" href="http://www.cdi-spec.org" rel="nofollow">CDI Web site</a></li></ul></div>
+</div></div><h3 id="CDI-Supportedcontainers">Supported containers</h3><p>The Camel CDI component is compatible with any CDI 1.0, CDI 1.1 and CDI 1.2 compliant runtime. It's been successfully tested against the following runtimes:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Container</th><th colspan="1" rowspan="1" class="confluenceTh">Version</th><th colspan="1" rowspan="1" class="confluenceTh">Runtime</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Weld SE</td><td colspan="1" rowspan="1" class="confluenceTd"><code>1.1.28.Final</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.0 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">OpenWebBeans</td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1.2.7</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.0 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Weld S
 E</td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2.3.2.Final</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">OpenWebBeans</td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1.6.2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java SE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">WildFly</td><td colspan="1" rowspan="1" class="confluenceTd"><code>8.2.1.Final</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java EE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">WildFly</td><td colspan="1" rowspan="1" class="confluenceTd"><code>9.0.1.Final</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / Java EE 7</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Karaf</td><td colspan="1" rowspan="1" class="confluenceTd"><code>2.4.4</code></td><td colspan="1" rowspan=
 "1" class="confluenceTd">CDI 1.2 / <span>OSGi 4 / PAX CDI</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Karaf</td><td colspan="1" rowspan="1" class="confluenceTd"><code>3.0.5</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / <span>OSGi 5 / PAX CDI</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Karaf</td><td colspan="1" rowspan="1" class="confluenceTd"><code>4.0.4</code></td><td colspan="1" rowspan="1" class="confluenceTd">CDI 1.2 / <span>OSGi 6 / PAX CDI</span></td></tr></tbody></table></div><h3 id="CDI-Examples">Examples</h3><p>The following examples are available in the <code>examples</code> directory of the Camel project:</p><ul><li><code>camel-example-cdi-metrics</code> - illustrates the integration between Camel, Dropwizard Metrics and CDI,</li><li><code>camel-example-cdi-properties</code> -&#160;illustrates the integration between Camel, DeltaSpike and CDI for configuration properties,</li><li><code>camel-example
 -cdi-osgi</code> - a&#160;CDI application using the SJMS component that can be executed inside an OSGi container using PAX CDI,</li><li><code>camel-example-cdi-rest-servlet</code> -&#160;illustrates the Camel REST DSL being used in a Web application that uses CDI as dependency injection framework,</li><li><code>camel-example-widget-gadget-cdi</code> - The Widget and Gadget use-case from the EIP book implemented in Java with CDI dependency Injection.</li></ul><h3 id="CDI-SeeAlso">See Also</h3><ul><li><a shape="rect" class="external-link" href="http://www.cdi-spec.org" rel="nofollow">CDI Web site</a></li><li><a shape="rect" class="external-link" href="http://www.cdi-spec.org/ecosystem/" rel="nofollow">CDI ecosystem</a></li><li><a shape="rect" class="external-link" href="https://github.com/astefanutti/further-cdi" rel="nofollow">Going further with CDI</a> (See Camel CDI section)</li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">