camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astefanu...@apache.org
Subject camel git commit: Camel CDI: add new configuration event documentation
Date Fri, 14 Apr 2017 09:36:33 GMT
Repository: camel
Updated Branches:
  refs/heads/master 40be5d477 -> f9ba3d539


Camel CDI: add new configuration event documentation


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f9ba3d53
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f9ba3d53
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f9ba3d53

Branch: refs/heads/master
Commit: f9ba3d53957c4797169ac277ea59050402749daa
Parents: 40be5d4
Author: Antonin Stefanutti <antonin@stefanutti.fr>
Authored: Fri Apr 14 11:36:23 2017 +0200
Committer: Antonin Stefanutti <antonin@stefanutti.fr>
Committed: Fri Apr 14 11:36:23 2017 +0200

----------------------------------------------------------------------
 components/camel-cdi/src/main/docs/cdi.adoc | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f9ba3d53/components/camel-cdi/src/main/docs/cdi.adoc
----------------------------------------------------------------------
diff --git a/components/camel-cdi/src/main/docs/cdi.adoc b/components/camel-cdi/src/main/docs/cdi.adoc
index ba333cb..572eec3 100644
--- a/components/camel-cdi/src/main/docs/cdi.adoc
+++ b/components/camel-cdi/src/main/docs/cdi.adoc
@@ -64,6 +64,26 @@ Besides, `RouteContainer` beans are also automatically collected,
 instantiated and added to the `CamelContext` bean instance managed by
 Camel CDI when the container initializes.
 
+*Available as of Camel 2.19*
+
+In some situations, it may be necessary to disable the auto-configuration of the `RouteBuilder`
and `RouteContainer` beans. That can be achieved by observing for the `CdiCamelConfiguration`
event, e.g.:
+
+[source,java]
+----
+static void configuration(@Observes CdiCamelConfiguration configuration) {
+    configuration.autoConfigureRoutes(false);
+}
+----
+
+Similarly, it is possible to deactivate the automatic starting of the configured `CamelContext`
beans, e.g.:
+
+[source,java]
+----
+static void configuration(@Observes CdiCamelConfiguration configuration) {
+    configuration.autoStartContexts(false);
+}
+----
+
 ### Auto-configured Camel primitives
 
 Camel CDI provides beans for common Camel primitives that can be


Mime
View raw message