-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate & Spring Webflow Integration - Session is null
PostPosted: Thu Mar 11, 2010 6:03 am 
Newbie

Joined: Thu Mar 11, 2010 5:27 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.