If I understand what I've been reading, entities can be detached from one EntityManager and merged into the persistence context of the same or a different EM. So multiple threads could conceivably operate on detached objects using ordinary Java synchronization, and then merge their changes later.

I know there are a few things to watch out for if I do this. First, if I use lazy fetch and don't access all references before detaching my entities, they could contain unresolved references. This could result in exceptions if I access those references, or corrupt data if I merge an entity containing an unresolved (null) reference. Also, merging does not make an entity managed; it returns a new, managed copy of the entity. So I'll have to be careful not to have multiple entities containing different versions of the same data.

Anything else I should be aware of?