blob: 1020324a2309b3b3f4bbaca78dfa4bfeadaa73e9 [file] [log] [blame]
== Camel MyBatis Example
=== Introduction
This example shows how to exchange data using a shared database table.
The example has two Camel routes. The first route inserts new data into
the table, triggered by a timer to run every 5th second.
The second route picks up 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.
=== Build
You will need to install this example first to your local maven
repository with:
....
mvn install
....
=== Run
This example requires running in Apache Karaf / ServiceMix
You can install this example from the shell using this examples
`+features.xml+` for easy provisioning.
....
feature:repo-add camel ${version}
feature:install camel
feature:repo-add mvn:org.apache.camel.example/camel-example-mybatis/${version}/xml/features
feature:install camel-example-mybatis
....
And you can see the application running by tailing the logs
....
log:tail
....
And you can use ctrl+c to stop tailing the log.
=== Configuration
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+`
=== Help and contributions
If you hit any problem using Camel or have some feedback, then please
https://camel.apache.org/support.html[let us know].
We also love contributors, so
https://camel.apache.org/contributing.html[get involved] :-)
The Camel riders!