|
This problem was previously discussed as a bug at: https://bugzilla.redhat.com/show_bug.cgi?id=1034444
Currently the persistence context referred to by a SwtichYard JPA Binding endpoint is different from the one CDI beans access through the injected EntityManager via JPA on the aplicatoin container, probably because the camel-jpa component by default uses their own EntityManagerFactory.
The consequences are that the different first leve caches for persistent entities may be used in a single transaction when using JPA in Bean services and JPA Binding at the same time, which may cause version mismatches for the same entity in a single transaction. This is not only harmful but also can impress users that SwitchYard and the Camel component are not well integrated.
|