camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babak Vahdat <>
Subject Re: Camel JPA - Parameterized Queries?
Date Fri, 14 Dec 2012 06:32:33 GMT

Am 14.12.12 03:16 schrieb "dmcamp" unter <>:

>Yeah sure.
>I just created a custom bean which uses JPA to query what I need. So,
>instead of the jpa endpoint, y use my bean, and that's it.

You can also achieve this easily through two lines of code in a
Processor/Bean etc. as the JpaEndpoint already exposes a JpaTemplate for
such cases:

JpaTemplate jpaTemplate = context.getEndpoint("jpa:" +
MyEntity.class.getName(), JpaEndpoint.class).getTemplate();
List<MyEntity> myEntites = jpaTemplate.find("select x from
com.domain.MyEntity e where e.processDate < ?1", new Date());


>View this message in context:
>Sent from the Camel - Users mailing list archive at

View raw message