...
After the project has been built (mvn install
), you will find the WAR file in ./target
. That file can simply be copied to the webapps
directory of your Jetty/Tomcat server.
Another popular deployment option is Karaf, which is a light-weight OSGi-based JVM container. Karaf has the advantage of supporting hot code swapping, which allows you to make sure that your routes are always running. It also allows you to deploy XML-based routes (Spring or Blueprint) by simply copying the files into a $KARAF_HOME/deploy
directory. If deploying camel routes to Karaf, Blueprint-based routes have some advantages over the Spring-based DSL, particularly in terms of being able to use property placeholders within your routes.
Karaf can be set up by:
...
installing required bundles:
Code Block | ||||
---|---|---|---|---|
| ||||
$> feature:repo-add camel 2.16.2
$> feature:repo-add activemq 5.11.1
$> feature:install camel
$> feature:install activemq-camel
# display available camel features
$> feature:list | grep camel
# install camel features, as needed
$> feature:install camel-http4
# install fcrepo-camel (as of v4.4.0)
$> feature:repo-add mvn:org.fcrepo.camel/fcrepo-camel/4.4.0/xml/features
$> feature:install fcrepo-camel |
setting up a service wrapper (so that karaf runs as a system-level service)
Code Block | ||||
---|---|---|---|---|
| ||||
$> feature:install wrapper
$> wrapper:install |
...
Now, routes can be deployed (and re-deployed) by simply copying JAR files or XML documents to $KARAF_HOME/deploy
.
Fedora Camel Toolbox
The Fedora project distributes camel routes for several common repository tasks as part of the fcrepo-camel-toolbox project, for use with Karaf version 4.x. Additional information is available on the Integration Services page. Detailed installation instructions are available as part of the project README and follow this pattern:
...
It is often useful to keep runtime statistics for your camel routes. Hawtio is a web console for monitoring your messaging infrastructure, and it can be deployed in any JVM container, including Karaf, Tomcat or Jetty.
In Karaf, hawtio can be installed like so:
...
language | bash |
---|---|
title | Karaf console |
...
Once deployed, hawtio is available at http://localhost:8181/hawtio/
...