-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Old Data
PostPosted: Mon Oct 09, 2006 7:17 am 
Newbie

Joined: Mon Oct 09, 2006 6:58 am
Posts: 2
I am a new user to hibernate. I encountered a problem

when I update a field in DB, the page does not show the new values and with referesh button it shows strange behaviour: sometimes shows correct values, sometime previous values, sometimes older values!!!

I test some solutions: disabling 2nd level cache, clearing session, ....

I use Hibernate 3.1.

Please contact me at samatartar@yahoo.com, if there is a solution.

Thanks beforehand,
sama


Top
 Profile  
 
 Post subject: Re: Problem
PostPosted: Mon Oct 09, 2006 7:40 am 
Newbie

Joined: Fri Sep 08, 2006 9:04 am
Posts: 3
1) Try to add the follwing lines to the hibernate.cfg.xml file


<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>


if the above won't work, i think u r not building the session factory each time. Try building the session factory each time and close it at the end fo the execution of ur logic.


Hope this works.


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

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.