Tom Cassimon created CAMEL-16470:
------------------------------------
Summary: Problem when using multiple EntityManagerFactories for
different datasources in the same route
Key: CAMEL-16470
URL: https://issues.apache.org/jira/browse/CAMEL-16470
Project: Camel
Issue Type: Bug
Components: camel-jpa
Affects Versions: 3.9.0, 3.8.0, 3.7.3
Reporter: Tom Cassimon
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)