We had a scenario where we commit some records during one AJAX call in the DB using Hibernate, but the immediate next AJAX call could not show it on the same page. We had committed the data properly, but the record refuses to show up in the list.
We did not have any second level cache, so we were debugging it based on the Session closure and opening. Issue turned out to be that the proper transaction isolation level was not set in hibernate.cfg.xml file.
I am not going to go in depth on Transaction Isolation levels here, which you can read from here
The issue was resolved after we set the Isolation level with the following line in the config XML :
An explanation on the numbers to be used for your level can be found here (look for isolation)