title: getCurrentSession() vs openSession()
body: <p>I'm trying to use generic-dao (<a href="http://code.google.com/p/hibernate-generic-dao/" rel="nofollow">http://code.google.com/p/hibernate-generic-dao/</a> ). However, in my HibernateBaseDAO the getSession() method is implemented as sessionFactory.getCurrentSession(). This leads to an error for any entity update </p>
  
  <pre><code>org.hibernate.HibernateException: createCriteria is not valid without active transaction
  </code></pre>
  
  <p>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?</p>