I have a question on use of entities in between different entities.
Q: Is it valid to share a single or more entities among two or more persistence units as given below for CommonEntity.
<persistence-unit name = "actionBazaar">
<persistence-unit name = "humanResources">
If so, Is there any consideration need to be taken while using this kind of entities and persistence-units
Without knowing the answer exactly I'm pretty sure it IS possible. After all regarding persistence an entity basically defines just your O/R mapping. And I think it would be too uncommon to have an application which uses the same mapping for more than one persistence unit/database. Therefore I can't see any good reason why it should not be possible. In the end the target database is defined by the EntityManager you use and so the entity itself shouldn't even care about multiple PUs.