Skip to content

Commit

Permalink
Switching to karaf 4 and newer camel. Thanks to Eric Hebert
Browse files Browse the repository at this point in the history
  • Loading branch information
cschneider committed Jan 16, 2017
1 parent 1a35b24 commit f110c16
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
19 changes: 17 additions & 2 deletions camel/order/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ To run the route using maven from the command line:

To deploy in Karaf

features:addurl mvn:org.apache.camel.karaf/apache-camel/2.9.0/xml/features
features:install camel-blueprint camel-mail camel-velocity camel-stream
feature:repo-add camel 2.16.2
feature:install camel-blueprint camel-mail camel-velocity camel-stream
install -s mvn:net.lr.tutorial.karaf.camel/example-order/1.0-SNAPSHOT

To be able to receive the mail you have to edit the configuration pid. You can either do this by placing a properties file
into etc/net.lr.tutorial.karaf.cxf.personservice.cfg or editing the config pid using the karaf webconsole. (See part 2 and part 3 of the Karaf Tutorial series).
Basically you have to set these two properties according to your own mail environment.
mailserver=yourmailserver.com
testVendorEmail=youmail@yourdomain.com

Test the order example
----------
Copy the file order1.xml into the folder "ordersin" below the karaf dir.
The Karaf console will show:
Order from Christian Schneider

Count: 1, Article: Flatscreen TV
The same should be in a mail in your inbox. At the same time a file should be created in ordersout/Christian Schneider/order1.xml that contains the book item.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void configure() throws Exception {

from("direct:vendor").id("mailtovendor")
.setHeader("to", method("vendorMailService"))
.setHeader("subject", simple("Bestellung fuer ${header.customer}"))
.setHeader("subject", simple("Order from ${header.customer}"))
.to("velocity:mailtemplate.txt")
.to("stream:out")
.to("smtp:{{mailserver}}");
Expand Down
6 changes: 3 additions & 3 deletions camel/simple-blueprint/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ This example just contains a blueprint file with a camel context and a route.
Run in Karaf
------------

features:addurl mvn:org.apache.camel.karaf/apache-camel/2.8.2/xml/features
features:install camel-blueprint camel-stream
feature:repo-add camel 2.16.2
feature:install camel-blueprint camel-stream

Copy the file simplecamel.xml into the deploy folder of karaf
Copy the file simple-camel-blueprint.xml into the deploy folder of karaf

> list

Expand Down

0 comments on commit f110c16

Please sign in to comment.