Hi,
I have a problem in retrieving the latest data in the database using hibernate. In my application, I log in to an account and modify a record in the DB using session.update(instance) [with committed at the end]. I can see in the DB table that it was properly updated. However, when I try to view my update with the same user, the data retrieved not updated(even after removing the browser cache). I also tried logging in as a different user and data displayed is still the old one.
The right values will only be reflected after restarting the server. The problem might have something to do with my session/object mgt or I might have missed some configuration setting.
Im using the Hibernate util in
http://www.hibernate.org/hib_docs/refer ... start.html
and in my objetctDAO, I just have this to get the session.
private Session session = getSession();
protected Session getSession() {
try {
return HibernateUtil.currentSession();
} catch (Exception e) {
log.error("Could not locate SessionFactory in JNDI", e);
throw new IllegalStateException(
"Could not locate SessionFactory in JNDI");
}
}
Can anybody point me to the right direction? Ill appreciate any feedback/insight.
TIA