Details
Description
When using multiple datasources for jpa in the same route, the EntityManager first created gets reused for the second jpa call, but this is the wrong EntityManager (for datasource 1 instead of datasource 2).
This re-use is found in the JpaHelper class where the EntityManager is stored as property on the Exchange.
The outcome of this PR will still result in re-use of the Entitymanager but storing the EntityManager in a map with the hashCode of the EntityManagerFactory as a key.
Attachments
Issue Links
- is related to
-
CAMEL-16501 camel-jpa - Avoid using EntityManager from header by default
- Open
- links to
(1 links to)