Package org.axonframework.common.jpa
Interface EntityManagerProvider
- All Known Implementing Classes:
ContainerManagedEntityManagerProvider,FactoryBasedEntityManagerProvider,SimpleEntityManagerProvider
Provides components with an EntityManager to access the persistence mechanism. Depending on the application
environment, this may be a single container managed EntityManager, or an application managed instance for one-time
use.
Note that the implementation is responsible for keeping track of transaction scope, if necessary. Generally, this is
the case when using application-managed EntityManagers.
- Since:
- 1.3
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManagerReturns the EntityManager instance to use.
-
Method Details
-
getEntityManager
jakarta.persistence.EntityManager getEntityManager()Returns the EntityManager instance to use. Note that the implementation is responsible for keeping track of transaction scope, if necessary. Generally, this is the case when using application-managed EntityManagers.- Returns:
- the EntityManager instance to use.
-