4.3.2. Application Managed Entity Manager

4.3.2. Application Managed Entity Manager

Application-managed entity manager are always EXTENDED. When you create an entity manager inside a transaction, the entity manager automatically join the current transaction. If the entity manager is created outside a transaction, the entity manager will queue the modification operations. When

the entity manager join the transaction and all the queued operations will then be executed to synchronize the persistence context.

It is not legal to call entityManager.joinTransaction() if no JTA transaction is involved.