...
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jpa</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> |
Sending to the endpoint
You can store a Java entity bean in a database by sending it to a JPA producer endpoint. The body of the In message is assumed to be an entity bean (that is, a POJO with an @Entity annotation on it) or a collection or array of entity beans.
...
If you are consuming a lot (100K+) of rows and experience OutOfMemory problems you should set the maximumResults to sensible value.
Note: Since Camel 2.18, JPA now includes a JpaPollingConsumer
implementation that better supports Content Enricher using pollEnrich()
to do an on-demand poll that returns either none, one or a list of entities as the result.
URI format
Code Block |
---|
jpa:entityClassName[?options] |
...