tree: e1bf9f1fd55c1f48579ab38c21568abfc63b41fc [path history] [tgz]
  2. pom.xml
  3. src/

Camel MyBatis Example


This example shows how to exchange data using a shared database table.

The example has two Camel routes. The first route insert new data into the table, triggered by a timer to run every 5th second.

The second route pickup the newly inserted rows from the table, process the row(s), and mark the row(s) as processed when done; to avoid picking up the same rows again.


You will need to install this example first to your local maven repository with:

mvn install


This example requires running in Apache Karaf / ServiceMix

You can install this example from the shell using this example's features.xml for easy provisioning.

features:addUrl mvn:org.apache.camel/camel-example-mybatis/${version}/xml/features
features:install camel-example-mybatis

And you can see the application running by tailing the logs


And you can use ctrl+c to stop tailing the log.


This example uses OSGi Blueprint to setup and configure the database, as well the CamelContext. You can see this in the following file: In the src/main/resources/OSGI-INF/blueprint/camel-mybatis.xml


This example is documented at

Forum, Help, etc

If you hit an problems please let us know on the Camel Forums

Please help us make Apache Camel better - we appreciate any feedback you may have. Enjoy!