Hi All,
We are using the JPA annotations to get the sessionFactory and when getting the session object by using getCurrentSession() method it gives the
No Hibernate Session bound to thread error. We can use the openSession() method without any issue but we need use getCurrentSession(). Please help
Versions we use
Spring version 2.5
Hibernate Core version 3.3.1 GA
Hibernate Annotation version is 3.4.0 GA
Comments Pls..
ApplicationContext configured as follows
Code:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="myDataSource"/>
<property name="annotatedClasses">
Code:
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>