EntityManager createEntityManager(
SynchronizationType synchronizationType
)
Create a new JTA application-managed
EntityManager
with the specified synchronization type. This method returns a new EntityManager
instance each time it is invoked. The isOpen
method will return true on the returned instance. - Parameters:
synchronizationType
- how and when the entity manager should be synchronized with the current JTA transaction
- Return:
- entity manager instance
- Throws:
- IllegalStateException - if the entity manager factory has been configured for resource-local entity managers or is closed
- Since:
- JPA 2.1