| java.lang.Object org.springframework.orm.jpa.SharedEntityManagerCreator
SharedEntityManagerCreator | abstract public class SharedEntityManagerCreator (Code) | | Factory for a shared JPA EntityManager for a given EntityManagerFactory.
The shared EntityManager will behave just like an EntityManager fetched
from an application server's JNDI environment, as defined by the JPA
specification. It will delegate all calls to the current transactional
EntityManager, if any; else, it will fall back to a newly created
EntityManager per operation.
author: Juergen Hoeller author: Rod Johnson since: 2.0 See Also: org.springframework.orm.jpa.LocalEntityManagerFactoryBean See Also: org.springframework.orm.jpa.JpaTransactionManager |
Method Summary | |
public static EntityManager | createSharedEntityManager(EntityManagerFactory emf) Create a shared transactional EntityManager proxy,
given this EntityManagerFactory
Parameters: emf - the EntityManagerFactory to delegate to.If this implements the EntityManagerFactoryInfo interface, appropriate handlingof the native EntityManagerFactory and available EntityManagerPlusOperationswill automatically apply. | public static EntityManager | createSharedEntityManager(EntityManagerFactory emf, Map properties) | public static EntityManager | createSharedEntityManager(EntityManagerFactory emf, Map properties, Class... entityManagerInterfaces) Create a shared transactional EntityManager proxy,
given this EntityManagerFactory
Parameters: emf - EntityManagerFactory to obtain EntityManagers from as needed Parameters: properties - the properties to be passed into the createEntityManager call (may be null ) Parameters: entityManagerInterfaces - interfaces to be implemented by theEntityManager. |
createSharedEntityManager | public static EntityManager createSharedEntityManager(EntityManagerFactory emf)(Code) | | Create a shared transactional EntityManager proxy,
given this EntityManagerFactory
Parameters: emf - the EntityManagerFactory to delegate to.If this implements the EntityManagerFactoryInfo interface, appropriate handlingof the native EntityManagerFactory and available EntityManagerPlusOperationswill automatically apply. a shareable transaction EntityManager proxy |
createSharedEntityManager | public static EntityManager createSharedEntityManager(EntityManagerFactory emf, Map properties)(Code) | | Create a shared transactional EntityManager proxy,
given this EntityManagerFactory
Parameters: emf - the EntityManagerFactory to delegate to.If this implements the EntityManagerFactoryInfo interface, appropriate handlingof the native EntityManagerFactory and available EntityManagerPlusOperationswill automatically apply. Parameters: properties - the properties to be passed into the createEntityManager call (may be null ) a shareable transaction EntityManager proxy |
createSharedEntityManager | public static EntityManager createSharedEntityManager(EntityManagerFactory emf, Map properties, Class... entityManagerInterfaces)(Code) | | Create a shared transactional EntityManager proxy,
given this EntityManagerFactory
Parameters: emf - EntityManagerFactory to obtain EntityManagers from as needed Parameters: properties - the properties to be passed into the createEntityManager call (may be null ) Parameters: entityManagerInterfaces - interfaces to be implemented by theEntityManager. Allows the addition or specification of proprietary interfaces. a shareable transaction EntityManager proxy |
|
|