Hello,

I am facing a transaction issue with the entity manager injected using
blueprint.xml. There are 2 persistence bundles each managing different
entities. For instance, the entity1 managed by entityManager1 holds an
entity2 managed by entityManager2. So when the entityManager1 tries to
persist its entity1, the I get an error since internally entity1 holds
entity2 which cannot be persisted by entityManager1.

The solution to this is to detach the entity2 from the entityManager2. But
since the entity managers are loaded through persistence units by using JPA
annotation @PersistenceContext, this detaching cannot be done. So what
could be the alternate solution to this issue.

Regards,
Akash

Reply via email to