LibraryToggle FramesPrintFeedback

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 Fuse Mediation Router.

[Important]Important

Note that Camel also ships with a JPA component. The JPA component abstracts from the underlying persistence provider and allows you to work with Hibernate, OpenJPA or EclipseLink.

hibernate:[entityClassName][?options]

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, ?option=value&option=value&...

Name Default Value Description
entityType entityClassName Is the provided entityClassName from the URI.
consumeDelete true Option for HibernateConsumer only. Specifies whether or not the entity is deleted after it is consumed.
consumeLockEntity true Option for HibernateConsumer only. Specifies whether or not to use exclusive locking of each entity while processing the results from the pooling.
flushOnSend true Option for HibernateProducer only. Flushes the EntityManager after the entity bean has been persisted.
maximumResults -1 Option for HibernateConsumer only. Set the maximum number of results to retrieve on the Query.
consumer.delay 500 Option for HibernateConsumer only. Delay in millis between each poll.
consumer.initialDelay 1000 Option for HibernateConsumer only. Millis before polling starts.
consumer.userFixedDelay false Option for HibernateConsumer only. Set to true to use fixed delay between polls, otherwise fixed rate is used. See ScheduledExecutorService in JDK for details.

Comments powered by Disqus