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 3-10 seconds, it is getting the new/updated data .

How to solve this issue.

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

Query:

            sess = HibernateConfigurator.getSessionFactory().openSession();
            List  result = sess.find(p_query);
                  


Thanks in Advance
Sridhar