actually camel is pretty smart. if you create one and put it in the registry, it will find it by type and use it automatically.
so in my startCamel code. I do this SimpleRegistry reg = new SimpleRegistry(); EntityManagerFactory factory = Persistence.createEntityManagerFactory("camel",properties); reg.put("jpaEntityManagerFactory", factory); final CamelContext camelContext = new DefaultCamelContext(reg); camel is the default JPA unit name. On Wed, Jun 10, 2015 at 4:15 AM, erik_romson <e...@zenior.no> wrote: > I suppose that. > ---- > In Camel 2.3 the JpaComponent will auto lookup the EntityManagerFactory > from > the Registry which means you do not need to configure this on the > JpaComponent as shown above. You only need to do so if there is ambiguity, > in which case Camel will log a WARN. > ---- > clearly states that it is the same entitymanager. The used one was just > wrapped in so many proxy layers that I didn't understand it. > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/spring-boot-jpa-entitymanagers-and-Java-DSL-tp5768055p5768060.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Omnem crede diem tibi diluxisse supremum.