blob: 47a6dac8cd71f6374416daec761de8b12f90984b [file] [log] [blame]
== Camel JDBC Example
=== Introduction
This example shows how to use camel-jdbc component with an embedded
Apache Derby database.
=== Build
You will need to compile this example first:
[source,sh]
----
$ mvn compile
----
=== Run
To run the example execute
[source,sh]
----
$ mvn camel:run
----
To stop the example hit ctrl+c
=== Configuration
This example uses Spring to set up and configure the database, as well
the CamelContext.
You can see this in the following file:
`+src/main/resources/META-INF/spring/camel-context.xml+`
The spring config setups three routes as follows:
* `+sample-generator-route+` This route will generate sample data and load it into the database upon Camel starts.
* `+query-update-route-part1/query-update-route-part2+` These two are connected together. It first queries the database for NEW
records to be processed, invoke `RecordProcessor` bean to do the work, then
update the record as DONE to not be processed again on the next polling.
=== Help and contributions
If you hit any problem using Camel or have some feedback, then please
https://camel.apache.org/community/support/[let us know].
We also love contributors, so
https://camel.apache.org/community/contributing/[get involved] :-)
The Camel riders!