Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
The hibernate: component allows you to work with databases using Hibernate as the object relational mapping technology to map POJOs to database tables. The camel-hibernate library is provided by the Camel Extra project which hosts all *GPL related components for Camel.
Sending to the endpoint
Sending POJOs to the hibernate endpoint inserts entities into the database. The body of the message is assumed to be an entity bean that you have mapped to a relational table using the hibernate
If the body does not contain an entity bean, use a Message Translator in front of the endpoint to perform the necessary conversion first.
Consuming from the endpoint
Consuming messages removes (or updates) entities in the database. This allows you to use a database table as a logical queue; consumers take messages from the queue and then delete/update them to logically remove them from the queue.
If you do not wish to delete the entity when it has been processed, you can specify
If you would rather perform some update on the entity to mark it as processed (such as to exclude it from a future query) then you can annotate a method with @Consumed which will be invoked on your entity bean when the entity bean is consumed.
For sending to the endpoint, the entityClassName is optional. If specified it is used to help use the type conversion to ensure the body is of the correct type.
For consuming the entityClassName is mandatory.
You can append query options to the URI in the following format,