I'm trying to use generic-dao (http://code.google.com/p/hibernate-generic-dao/ ). However, in my HibernateBaseDAO the getSession() method is implemented as sessionFactory.getCurrentSession(). This leads to an error for any entity update
org.hibernate.HibernateException: createCriteria is not valid without active transaction
However, when I use openSession() in place of getCurrentSession(), it works. I'm not using spring as a dependency in pom.xml. I've been reading on openSession() and getCurrentSession(), however still can't understand why this is happening?