1

In the Camel-JDBC component, we can send a select statement as a body to the jdbc endpoint, which returns the results.

Below sample code is from the Camel-JDBC website:

from("direct:projects")
   .setHeader("lic", constant("ASF"))
   .setHeader("min", constant(123))
   .setBody("select * from projects where license = :?lic and id > :?min order by id")
   .to("jdbc:myDataSource?useHeadersAsParameters=true")

Why is such an option not present in the Camel-JPA component?

Using JPA endpoint as a consumer will poll the database. But, all I want is to just get the data once.

4

1 に答える 1