Using Spring 2.0.5
in the dao class
@Repository
@Transactional
public class IsActiveTestDao {
private EntityManager em;
public void populateIsActiveTest(){
Session session = em.unwrap(Session.class);
when I do this or any 50 other ways like:
SessionFactory f = em.unwrap(SessionFactory.class);
I have also tried
em.getDelegate()
I always get a Null Pointer Exception
My question is Can I obtain a hibernate session from a JPA Entity Manager in Spring while using the @Transactional annotation?