spring-framework / org.springframework.orm.jpa / ExtendedEntityManagerCreator / createApplicationManagedEntityManager

createApplicationManagedEntityManager

open static fun createApplicationManagedEntityManager(rawEntityManager: EntityManager, emfInfo: EntityManagerFactoryInfo): EntityManager

Create an application-managed extended EntityManager proxy.

Parameters

rawEntityManager - the raw EntityManager to decorate

emfInfo - the EntityManagerFactoryInfo to obtain the JpaDialect and PersistenceUnitInfo from

Return
an application-managed EntityManager that can join transactions but does not participate in them automatically

open static fun createApplicationManagedEntityManager(rawEntityManager: EntityManager, emfInfo: EntityManagerFactoryInfo, synchronizedWithTransaction: Boolean): EntityManager

Create an application-managed extended EntityManager proxy.

Parameters

rawEntityManager - the raw EntityManager to decorate

emfInfo - the EntityManagerFactoryInfo to obtain the JpaDialect and PersistenceUnitInfo from

synchronizedWithTransaction - whether to automatically join ongoing transactions (according to the JPA 2.1 SynchronizationType rules)

Return
an application-managed EntityManager that can join transactions but does not participate in them automatically

Since
4.0