This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
No announcement yet.
How to integrate Spring and Hibernate Entitymanager?Page Title Module
I was extending JpaSupport (not JpaDaoSupport) and using getEntityManager() rather than using the JpaTemplate.
All works now.. thanks for your help
My DAO extend JpaDaoSupport and yet I get null when call getEntityManager().
Do you mean I should use those "find" methods of JpaTemplate object, instead of using EntityManager? I thought that since we use JPA here anyway, than JpaTemplate uses EntityManager underneath, so why can't I get a reference to it?
Is it because of different exception model? Using EntityManager directly implies dealing with checked exceptions as opposed to wraped exceptions, am I right?