• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database Refresh Issue(Save and query)

 
sridhar vr
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using hibernate 1.2, when I save the data it is getting save in the database(save) , but immediatly i am(query) checking for the updated data, I am not getting the refreshed data, getting the old data. After 30 seconds, it is getting the new data .

How to solve this issue.

Code snippet:
sess = HibernateConfigurator.getSessionFactory().openSession();
sess.saveOrUpdate(p_obj);

//flush
sess.flush();

Thanks in Advance
Sridhar
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using Hibernate 1.2? And where do you commit your transaction?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean JSF 1.2?

It sounds like that data isn't being passed between a persistent POJO and a JSF managed bean. I'd check the synchronization between those two points, especially if you are using JSF 1.2.

Hibernate has moved way beyond 1.2.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic