camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erik_romson <>
Subject spring boot, jpa, entitymanagers and Java DSL
Date Wed, 10 Jun 2015 07:05:19 GMT
I'm a bit confused regarding the JPA endpoint and entitymanagers.

I'm using spring boot and using the *default* entitymanager. As the
documentation points out, the endpoints use different entity managers

There are documentation of how to set an entity manager using spring xml or
creating a JPA endpoint (new JpaComponent(), set entity Manager etc)

if I have a route


to have the same entityManagerFactory my plan was to use

JpaComponent jpaComponent=new JpaComponent();
//injected entitymanager from spring
JpaEndpoint jpaEndpointPerson= new

and add it to the from() in the route and thereafter use the passed along
entity manager.

This doesn't work as as the jpaEndpoint doesn't parse/read the uri (nothing
is set in org.apache.camel.component.jpa.JpaConsumer#createQueryFactory)

I'm probably blind but I fail to find any documentation on how to do this.
Any pointers would be very appreciated. 

Also with the upcoming setting *sharedEntityManager* in Camel 2.16, would
this solve all my problems?

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

View raw message