generic-dao ( http://code.google.com/p/hibernate-generic-dao/ )を使用しようとしています。ただし、私の HibernateBaseDAO では、getSession() メソッドは sessionFactory.getCurrentSession() として実装されています。これにより、エンティティの更新でエラーが発生します
org.hibernate.HibernateException: createCriteria is not valid without active transaction
ただし、getCurrentSession() の代わりに openSession() を使用すると、機能します。pom.xml の依存関係として spring を使用していません。私は openSession() と getCurrentSession() を読んできましたが、なぜこれが起こっているのか理解できませんか?