}
for (Map.Entry<EntityManagerFactory, EntityManager> entry : entityManagers.entrySet()) {
EntityManagerFactory entityManagerFactory = entry.getKey();
EntityManager entityManager = entry.getValue();
entityManager.joinTransaction();
EntityManagerTxKey txKey = new EntityManagerTxKey(entityManagerFactory);
transactionRegistry.putResource(txKey, entityManager);
}
}
}