|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.orm.jpa.SharedEntityManagerCreator
public abstract class SharedEntityManagerCreator
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.
LocalEntityManagerFactoryBean
,
JpaTransactionManager
Constructor Summary | |
---|---|
SharedEntityManagerCreator()
|
Method Summary | |
---|---|
static javax.persistence.EntityManager |
createSharedEntityManager(javax.persistence.EntityManagerFactory emf)
Create a shared transactional EntityManager proxy, given this EntityManagerFactory |
static javax.persistence.EntityManager |
createSharedEntityManager(javax.persistence.EntityManagerFactory emf,
Map properties)
Create a shared transactional EntityManager proxy, given this EntityManagerFactory |
static javax.persistence.EntityManager |
createSharedEntityManager(javax.persistence.EntityManagerFactory emf,
Map properties,
Class... entityManagerInterfaces)
Create a shared transactional EntityManager proxy, given this EntityManagerFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SharedEntityManagerCreator()
Method Detail |
---|
public static javax.persistence.EntityManager createSharedEntityManager(javax.persistence.EntityManagerFactory emf)
emf
- the EntityManagerFactory to delegate to.
If this implements the EntityManagerFactoryInfo interface, appropriate handling
of the native EntityManagerFactory and available EntityManagerPlusOperations
will automatically apply.
public static javax.persistence.EntityManager createSharedEntityManager(javax.persistence.EntityManagerFactory emf, Map properties)
emf
- the EntityManagerFactory to delegate to.
If this implements the EntityManagerFactoryInfo interface, appropriate handling
of the native EntityManagerFactory and available EntityManagerPlusOperations
will automatically apply.properties
- the properties to be passed into the createEntityManager
call (may be null
)
public static javax.persistence.EntityManager createSharedEntityManager(javax.persistence.EntityManagerFactory emf, Map properties, Class... entityManagerInterfaces)
emf
- EntityManagerFactory to obtain EntityManagers from as neededproperties
- the properties to be passed into the createEntityManager
call (may be null
)entityManagerInterfaces
- interfaces to be implemented by the
EntityManager. Allows the addition or specification of proprietary interfaces.
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |