I have a Spring MVC 4.0 application, and I am learning JPA. I use Hibernate as the JPA implementation.
I can configure Hibernate as described in this tutorial. It works
For the @PersistenceContext EntityManager entityManager; approach, add tx:annotation-driven to your .xml configuration and mark your methods where you use entityManager as @Transactional.
@PersistenceContext EntityManager entityManager;
tx:annotation-driven
entityManager
@Transactional