| FactoryBeans that exposes a shared JPA EntityManager reference for a
given EntityManagerFactory. Typically used for an EntityManagerFactory
created by LocalEntityManagerFactoryBean, as direct alternative to a
JndiObjectFactoryBean definition for a Java EE 5 server's EntityManager.
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.
Can be passed to DAOs that expect a shared EntityManager reference
rather than an EntityManagerFactory reference. Note that Spring's
JpaTransactionManager always needs an EntityManagerFactory reference,
to be able to create new transactional EntityManager instances.
author: Juergen Hoeller since: 2.0 See Also: SharedEntityManagerBean.setEntityManagerFactory See Also: SharedEntityManagerBean.setEntityManagerInterface See Also: org.springframework.orm.jpa.LocalEntityManagerFactoryBean See Also: org.springframework.orm.jpa.JpaTransactionManager |