-->
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: server is not reading the updated data from database
PostPosted: Wed Sep 01, 2010 2:16 am 
Newbie

Joined: Wed Sep 01, 2010 2:05 am
Posts: 1
Describing ....

client updates the database.then the hibernate database updated,server should read the updated value from database at that moment.But its not happening.to read the updated value from the database,i have to restart the server.then it reads.

So plz help me anybody..

Thanx in advance


Top
 Profile  
 
 Post subject: Re: server is not reading the updated data from database
PostPosted: Fri Sep 03, 2010 7:37 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
client updates the database
.

Please verify that flush and commit are both called in this step.

Quote:
then the hibernate database updated,server should read the updated value from database at that moment.But its not happening.


Be aware of the fact that Hibernates persistent context behavior is similar to the repeatable-read isolation behavior:
Once you have loaded an entity object into persistent context it doesn't perceive changes on this entity object which in meantime have been commited by other sessions. To reach this you must first clear the persistent context or evict the single entity from persistent context.


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.