Hi All,
We are using Hibernate and Spring Integration in our project. Hibernate session management is not managed well in the Spring Webflow. Hibernate sessions referenced in the 'Flow scoped beans' are becoming null, but on other scope like httpsession, everything is fine. To fix this problem, we have a work around in place - use session per Thread: <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.DB2Dialect</prop> <prop key="hibernate.default_schema">XXX</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.current_session_context_class">thread</prop> <prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</prop> </props> </property>
This works fine. But we want to make sure that this approach is correct. We appreciate any suggestions.
Thanks in advance
-Vish
|