Hi,
> do you know why it is happening?
Do not know enough on how or where you are using this double-em solution to
comment. 
A sanity check of this sort might help

Metamodel m1 = emDB2.getMetamodel();
Metamodel m2 = emSS.getMetamodel();
assertNotSame(m1, m2);

Set<EntityType<?>> types1 = m1.getEntities();
Set<EntityType<?>> types2 = m2.getEntities();

// verify two sets are *either* dis-joint or at least their difference is
non-empty.

> so that we can achieve XA transaction?
The fact that 
a) your units are JTA 
and you are in a container environment, 
*should* make both the transactions from two ems join the 'global
transaction' managed by the container. 

If you do not see that is happening, see the facility EntityManager.join()
to join a transaction. 

-----
Pinaki 
--
View this message in context: 
http://openjpa.208410.n2.nabble.com/How-to-find-entity-belong-which-EntityManger-tp6470903p6479579.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to