Repository: camel Updated Branches: refs/heads/master fe1ef1670 -> f2fc0e015
Add blueprint doc Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f2fc0e01 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f2fc0e01 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f2fc0e01 Branch: refs/heads/master Commit: f2fc0e0157dc3c29ca0ca2d91eecb6e1ecb06b8e Parents: fe1ef16 Author: Claus Ibsen <[email protected]> Authored: Wed Jan 18 12:59:22 2017 +0100 Committer: Claus Ibsen <[email protected]> Committed: Wed Jan 18 12:59:22 2017 +0100 ---------------------------------------------------------------------- .../src/main/docs/blueprint.adoc | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/f2fc0e01/components/camel-blueprint/src/main/docs/blueprint.adoc ---------------------------------------------------------------------- diff --git a/components/camel-blueprint/src/main/docs/blueprint.adoc b/components/camel-blueprint/src/main/docs/blueprint.adoc new file mode 100644 index 0000000..e372c74 --- /dev/null +++ b/components/camel-blueprint/src/main/docs/blueprint.adoc @@ -0,0 +1,45 @@ +## Using OSGi blueprint with Camel + +A custom XML namespace for Blueprint has been created to let you leverage the nice XML dialect. +Given Blueprint custom namespaces are not standardized yet, this namespace can only be used on the Apache Aries Blueprint +implementation, which is the one used by Apache Karaf. + +### Overview + +The XML schema is mostly the same as the one for Spring, so all the xml snippets throughout the documentation +referring to Spring XML also apply to Blueprint routes. + +Here is a very simple route definition using blueprint: + +[source,xml] +------------------------------------------------------------ +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> + + <camelContext xmlns="http://camel.apache.org/schema/blueprint"> + <route> + <from uri="timer:test" /> + <to uri="log:test" /> + </route> + </camelContext> + +</blueprint> +------------------------------------------------------------ + +There are a few limitations at this point about the supported xml elements (compared to the Spring xml syntax): + +- beanPostProcessor are specific to Spring and aren't allowed + +However, using blueprint when you deploy your applications in an OSGi enviroment has several advantages: + +- when upgrading to a new camel version, you don't have to change the namespace, as the correct version will be + selected based on the camel packages that are imported by your bundle +- no startup ordering issue with respect to the custom namespaces and your bundles +- you can use Blueprint property placeholders + + +### Using camel-blueprint + +To leverage camel-blueprint in OSGi, you only need the Aries Blueprint bundle and the camel-blueprint bundle, +in addition to camel-core and its dependencies. + +If you use Karaf, you can use the feature named camel-blueprint which will install all the required bundles. \ No newline at end of file
