Author: buildbot
Date: Thu Apr 28 13:18:54 2016
New Revision: 986936
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 Thu Apr 28 13:18:54 2016
@@ -40,6 +40,7 @@
<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 src='//camel.apache.org/styles/highlighter/scripts/shBrushBash.js'
type='text/javascript'></script>
@@ -137,7 +138,7 @@ class CustomCamelContext extends Default
// ...
}
}]]></script>
-</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> and <a shape="rect" class="external-link"
href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method"
rel="nofollow">disposer</a> 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><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> and <a shape="rect" class="external-link"
href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method"
rel="nofollow">disposer</a> methods can also be used as well to customize
the Camel context bean, e.g.:</p></div><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
@@ -430,7 +431,37 @@ void observeCdiEvents(@Observes @Context
<script class="brush: text; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[cdi-event://PayloadType<T1,...,Tn>[?qualifiers=QualifierType1[,...[,QualifierTypeN]...]]]]></script>
</div></div><p>With the authority <code>PayloadType</code> (resp.
the <code>QualifierType</code>) being the URI escaped fully qualified name
of the payload (resp. qualifier) raw type followed by the type parameters
section delimited by angle brackets for payload parameterized type. Which leads
to <em>unfriendly</em> URIs, e.g.:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: text; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[cdi-event://org.apache.camel.cdi.example.EventPayload%3Cjava.lang.Integer%3E?qualifiers=org.apache.camel.cdi.example.FooQualifier%2Corg.apache.camel.cdi.example.BarQualifier]]></script>
-</div></div><p>But more fundamentally, that would prevent efficient binding
between the endpoint instances and the observer methods as the CDI container
doesn't have any ways of discovering the Camel context model during the
deployment phase.</p><h3
id="CDI-Auto-configuredOSGiintegration">Auto-configured OSGi
integration</h3><p><strong>Available as of Camel 2.17</strong></p><p>The Camel
context beans are automatically adapted by Camel CDI so that they are
registered as OSGi services and the various resolvers
(like <code>ComponentResolver</code>
and <code>DataFormatResolver</code>) integrate with the OSGi registry.
That means that the <a shape="rect" href="karaf.html#Karaf-Karafcommands">Karaf
Camel commands</a> can be used to operate the Camel contexts auto-configured by
Camel CDI, e.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div><p>But more fundamentally, that would prevent efficient binding
between the endpoint instances and the observer methods as the CDI container
doesn't have any ways of discovering the Camel context model during the
deployment phase.</p><h3 id="CDI-CamelXMLconfigurationimport">Camel XML
configuration import</h3><p><strong>Available as of Camel
2.18</strong></p><p>While CDI favors a typesafe dependency injection mechanism,
it may be useful to reuse existing Camel XML configuration files into a
Camel CDI application. In other use cases, it might be handy to rely on
the Camel XML DSL to configure its Camel context(s).</p><p>You can use
the <code>@ImportResource</code> annotation that's provided by Camel CDI
on any CDI beans and Camel CDI will automatically load the Camel XML
configuration at the specified locations, 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[@ImportResource("camel-context.xml")
+class MyBean {
+}]]></script>
+</div></div><p>Camel CDI will load the resources at the specified locations
from the classpath (other protocols may be added in the future).</p><p>Every
<code>CamelContext</code> elements and other Camel primitives from the imported
resources are automatically deployed as CDI beans during the container
bootstrap so that they benefit from the auto-configuration provided by Camel
CDI and become available for injection at runtime. If such an element has an
explicit <code>id</code> attribute set, the corresponding CDI bean is qualified
with the <code>@Named</code> qualifier, e.g., given the following Camel XML
configuration:</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[<camelContext id="foo">
+ <endpoint id="bar" uri="seda:inbound">
+ <property key="queue" value="#queue"/>
+ <property key="concurrentConsumers"
value="10"/>
+ </endpoint>
+<camelContext/>]]></script>
+</div></div><p>The <span style="color: rgb(71,71,71);">corresponding CDI
beans are automatically deployed and can be injected, e.g.:</span></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
+@ContextName("foo")
+CamelContext context;
+
+@Inject
+@Named("bar")
+Endpoint endpoint;]]></script>
+</div></div><p><span style="color: rgb(71,71,71);"><span style="color:
rgb(71,71,71);">Note that the </span><code>CamelContext</code><span
style="color: rgb(71,71,71);"> beans are automatically qualified with both
the </span><code>Named</code><span style="color:
rgb(71,71,71);"> and </span><code>ContextName</code><span
style="color: rgb(71,71,71);"> qualifiers. If the
imported </span><code>CamelContext</code><span style="color:
rgb(71,71,71);"> element doesn't have an </span><code>id</code><span
style="color: rgb(71,71,71);"> attribute, the corresponding bean is
deployed with the built-in </span><code>Default</code><span style="color:
rgb(71,71,71);"> qualifier.</span></span></p><p>Conversely, CDI beans
deployed in the application can be referred to from the Camel XML
configuration, usually using the <code>ref</code> attribute, e.g.,
given the following bean declared:</p><div class="code panel pdl"
style="border-w
idth: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[@Produces
+@Named("baz")
+Processor processor = exchange ->
exchange.getIn().setHeader("qux", "quux");]]></script>
+</div></div><p><span style="color: rgb(71,71,71);">A reference to that bean
can be declared in the imported Camel XML configuration, e.g.:</span></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[<camelContext id="foo">
+ <route>
+ <from uri="..."/>
+ <process ref="baz"/>
+ </route>
+<camelContext/>]]></script>
+</div></div><h3 id="CDI-Auto-configuredOSGiintegration">Auto-configured OSGi
integration</h3><p><strong>Available as of Camel 2.17</strong></p><p>The Camel
context beans are automatically adapted by Camel CDI so that they are
registered as OSGi services and the various resolvers
(like <code>ComponentResolver</code>
and <code>DataFormatResolver</code>) integrate with the OSGi registry.
That means that the <a shape="rect" href="karaf.html#Karaf-Karafcommands">Karaf
Camel commands</a> can be used to operate the Camel contexts auto-configured by
Camel CDI, e.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="brush: text; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[karaf@root()> camel:context-list
Context Status Total # Failed # Inflight #
Uptime
------- ------ ------- -------- ----------
------
@@ -479,7 +510,7 @@ for (CamelContext context : contexts)
context.setUseBreadcrumb(true);]]></script>
</div></div></div></div></div><h3 id="CDI-MavenArchetype">Maven
Archetype</h3><p>Among the available <a shape="rect"
href="camel-maven-archetypes.html">Camel Maven archetypes</a>, you can use the
provided <code>camel-archetype-cdi</code> 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.3.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.3</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><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh">Example</th><th colspan="1" rowspan="1"
class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi</span></code></t
d><td colspan="1" rowspan="1" class="confluenceTd">Illustrates how to work
with Camel using CDI to configure components, endpoints and
beans</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-metrics</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">Illustrates the integration
between Camel, Dropwizard Metrics and CDI</td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-properties</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">Illustrates the integration
between Camel, DeltaSpike and CDI for configuration properties</td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-osgi</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">A CDI application using the
SJMS component that can be executed inside an OSGi container using PAX
CDI</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-exampl
e-cdi-test</span></code></td><td colspan="1" rowspan="1"
class="confluenceTd">Demonstrates the testing features that are provided as
part of the integration between Camel and CDI</td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-rest-servlet</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">Illustrates the Camel REST DSL
being used in a Web application that uses CDI as dependency injection
framework</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-widget-gadget-cdi</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">The Widget and Gadget use-case
from the EIP book implemented in Java with CDI dependency
injection</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-swagger-cdi</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">An example using REST DSL and
Swagger Java with CDI</td></tr></tbody></table></div><h3 id="CDI-S
eeAlso">See Also</h3><ul><li><a shape="rect" href="cdi-testing.html">Camel CDI
Testing</a></li><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>
+</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.3.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.3</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><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh">Example</th><th colspan="1" rowspan="1"
class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi</span></code></t
d><td colspan="1" rowspan="1" class="confluenceTd">Illustrates how to work
with Camel using CDI to configure components, endpoints and
beans</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-metrics</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">Illustrates the integration
between Camel, Dropwizard Metrics and CDI</td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-properties</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">Illustrates the integration
between Camel, DeltaSpike and CDI for configuration properties</td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-osgi</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">A CDI application using the
SJMS component that can be executed inside an OSGi container using PAX
CDI</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-exampl
e-cdi-test</span></code></td><td colspan="1" rowspan="1"
class="confluenceTd">Demonstrates the testing features that are provided as
part of the integration between Camel and CDI</td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><code><span>camel-example-cdi-rest-servlet</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">Illustrates the Camel REST DSL
being used in a Web application that uses CDI as dependency injection
framework</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>camel-example-cdi-xml</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><span>Illustrates the use of Camel XML
configuration files into a Camel CDI application</span></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-widget-gadget-cdi</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">The Widget and Gadget use-case
from the EIP book implemented in Java with CDI dependency
injection</td></tr><tr><td c
olspan="1" rowspan="1"
class="confluenceTd"><code><span>camel-example-swagger-cdi</span></code></td><td
colspan="1" rowspan="1" class="confluenceTd">An example using REST DSL and
Swagger Java with CDI</td></tr></tbody></table></div><h3 id="CDI-SeeAlso">See
Also</h3><ul><li><a shape="rect" href="cdi-testing.html">Camel CDI
Testing</a></li><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">