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; otherwise, 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. Note that Spring's {@link org.springframework.orm.jpa.JpaTransactionManager}always needs an EntityManagerFactory in order to create new transactional EntityManager instances. @author Juergen Hoeller @since 2.0 @see #setEntityManagerFactory @see #setEntityManagerInterface @see org.springframework.orm.jpa.LocalEntityManagerFactoryBean @see org.springframework.orm.jpa.JpaTransactionManager
|
|