EntityManager createEntityManager(
SynchronizationType synchronizationType,
Map map
)
Create a new JTA application-managed
EntityManager
with the specified synchronization type and map of properties. 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 transactionmap
- properties for entity manager
- 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