Author: buildbot
Date: Fri Nov 11 01:18:50 2016
New Revision: 1000929
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 Fri Nov 11 01:18:50 2016
@@ -121,7 +121,7 @@ class MyRouteBean extends RouteBuilder {
from("jms:invoices").to("file:/invoices");
}
}]]></script>
-</div></div><p>Else, if more customization is needed,
any <strong><code>CamelContext</code></strong> class can be used to
declare a custom Camel context bean. Then,
the <strong><code>@PostConstruct</code></strong> and <code>@PreDestroy</code> lifecycle
callbacks can be done to do the customization, e.g.:</p><div class="highlight
highlight-source-java"><p> </p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Else, if more customization is needed,
any <strong><code>CamelContext</code></strong> class can be used to
declare a custom Camel context bean. Then,
the <strong><code>@PostConstruct</code></strong> and <strong><code>@PreDestroy</code></strong> lifecycle
callbacks can be done to do the customization, e.g.:</p><div class="highlight
highlight-source-java"><p> </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[@ApplicationScoped
class CustomCamelContext extends DefaultCamelContext {
@@ -271,7 +271,7 @@ 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 <a
shape="rect" class="external-link"
href="http://camel.apache.org/bean-integration.html">bean
integration</a>, Camel comes with a set of <a shape="rect"
class="external-link"
href="http://camel.apache.org/bean-integration.html#BeanIntegration-Annotations">annotations</a> 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"> </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"><p>Configuration property</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</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 <a
shape="rect" class="external-link"
href="http://camel.apache.org/bean-integration.html">bean
integration</a>, Camel comes with a set of <a shape="rect"
class="external-link"
href="http://camel.apache.org/bean-integration.html#BeanIntegration-Annotations">annotations</a> 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"> </th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Camel annotation</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>CDI equivalent</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>Configuration property</p></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[@PropertyInject("key")
String value;
]]></script>
@@ -321,7 +321,7 @@ MyBean bean;
void consume(@Body String body) {
//...
}]]></script>
-</div></div></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td></tr></tbody></table></div><h4
id="CDI-BeanComponent">Bean Component</h4><p>You can refer to CDI beans, either
by type or name, From the Camel DSL, e.g. with the Java Camel DSL:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td></tr></tbody></table></div><h4
id="CDI-BeanComponent">Bean Component</h4><p>You can refer to CDI beans, either
by type or name, from the Camel DSL, e.g., using the Java DSL:</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 MyBean {
//...
}
@@ -333,9 +333,11 @@ class MyNamedBean {
//...
}
Â
-from("direct:inbound").bean("foo");]]></script>
-</div></div><h4 id="CDI-ReferringBeansFromEndpointURIs">Referring Beans From
Endpoint URIs</h4><p><span style="color: rgb(0,0,0);">When configuring
endpoints using the URI syntax you can refer to beans in the </span><a
shape="rect" href="registry.html">Registry</a><span style="color:
rgb(0,0,0);"> using the <code>#</code>
notation.</span><span> </span><span style="color: rgb(0,0,0);">If the URI
parameter value starts with a </span><strong><code>#</code></strong><span
style="color: rgb(0,0,0);"> sign then Camel CDI will lookup</span><span
style="color: rgb(0,0,0);"> for a bean of the given type by name,
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[from("jms:queue:{{destination}}?transacted=true&transactionManager=#jtaTransactionManager").to("...");]]></script>
+from("direct:inbound")
+ .bean("foo");]]></script>
+</div></div><h4 id="CDI-ReferringBeansFromEndpointURIs">Referring Beans From
Endpoint URIs</h4><p><span style="color: rgb(0,0,0);">When configuring
endpoints using the URI syntax you can refer to beans in the </span><a
shape="rect" href="registry.html">Registry</a><span style="color:
rgb(0,0,0);"> using the <code>#</code>
notation.</span><span> </span><span style="color: rgb(0,0,0);">If the URI
parameter value starts with a </span><span style="color:
rgb(0,0,0);"><strong><code>#</code></strong> sign then Camel CDI will
lookup</span><span style="color: rgb(0,0,0);"> for a bean of the given
type by name, 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[from("jms:queue:{{destination}}?transacted=true&transactionManager=#jtaTransactionManager")
+ .to("...");]]></script>
</div></div><p>Having the following CDI bean qualified
with <strong><code>@Named("jtaTransactionManager")</code></strong>:</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[@Produces
@Named("jtaTransactionManager")
@@ -368,7 +370,7 @@ void onContextStarted(@Observes @Manual
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[void onExchangeCompleted(@Observes @Default
ExchangeCompletedEvent event) {
// Called after the exchange 'event.getExchange()' processing has
completed
}]]></script>
-</div></div><p>In that example, if no qualifier is specified,
the <code>@Any</code> 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 <a shape="rect" class="external-link"
href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events"
rel="nofollow">CDI events</a> 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 <strong><code>CdiEventEndpoint<T></code></strong> bean
provided by Camel CDI can be used to observe / consume CDI events whose
0;<em>event type</em> is <strong><code>T</code></strong>, 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 <strong><code>@Any</code></strong> 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 <a
shape="rect" class="external-link"
href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events"
rel="nofollow">CDI events</a> 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 <strong><code>CdiEventEndpoint<T></code></strong> bean
provided by Camel CDI can be used to observe / consume CDI
events whose <em>event
type</em> is <strong><code>T</code></strong>, 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<String> cdiEventEndpoint;