...
The applicationContextUri
will currently load the file from the classpath, so in the example above the myBlueprint.xml file must be in the root of the classpath.
Running CDI
From Camel 2.11 onwards the camel:run
plugin also supports running a CDI application
You would need to configure the camel:run plugin to use CDI, by setting useCDI to true as shown below
Code Block | ||||
---|---|---|---|---|
| ||||
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<configuration>
<useCDI>true</useCDI>
</configuration>
</plugin>
|
This allows you to boot up any CDI services you wish - whether they are Camel-related, or any other CDI enabled services.
You should add the CDI container of your choice (e.g. Weld or OpenWebBeans) to the dependencies of the camel-maven-plugin such as in this example.
From the source of Camel you can run a CDI example via
Code Block |
---|
cd examples/camel-example-cdi
mvn compile camel:run
|
About DOT generation
camel:run
will by default try to run dot generation to generate Visualisation diagrams.
This feature could in some rare cases cause the application to hang, so its by default disabled in Camel 1.6.1 or newer.
...