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.