Author: buildbot Date: Thu Apr 28 08:18:36 2016 New Revision: 986918 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 08:18:36 2016 @@ -349,6 +349,12 @@ PlatformTransactionManager createTransac <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> +</div></div><p>As of Camel 2.18, it is possible to observe events for a particular route (<code>RouteAddedEvent</code>, <code>RouteStartedEvent</code>, <code>RouteStoppedEvent</code> and <code>RouteRemovedEvent</code>) should it have an explicit defined, 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[from("...").routeId("foo").to("..."); +Â +void onRouteStarted(@Observes @Named("foo") RouteStartedEvent event) { + // Called after the route "foo" has started +}]]></script> </div></div><p>When multiple Camel contexts exist in the CDI container, the Camel context bean qualifiers, like <code>@ContextName</code>, can be used to refine the observer method resolution to a particular Camel context as specified in <a shape="rect" class="external-link" href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#observer_resolution" rel="nofollow">observer resolution</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 onRouteStarted(@Observes @ContextName("foo") RouteStartedEvent event) { // Called after the route 'event.getRoute()' for the Camel context 'foo' has started