I have a serious problem with session synchronization in cluster environment.
Our client has several servers belonging to the same cluster. One server (1) executes operations that perform update in a given table. Another server (2) performs Select and read the data updated. This not occurs at the same time but with difference of few minutes.
It seems that the server 2 cannot access to the last data update in the other server. Possibly, there 2 hibernate sessions are not synchronized, and the server 2 read from a cache not yet update at this moment.
Configuration detail:
-Hibernate 3.2.7
-Spring 2.0.5
-Oracle 10g
-Without using 2nd level Cache
-Each server runs the same application in Webshpere server 6.1, so 2 different session factories are used, one per each server.
-The queries used are HQL or Criteria.
My problem is that I cannot reproduce this problem in test environment. I would to know if there is some solution for forcing the query to get the data from the database every time is executed, if it is possible without installing the 2nd level cache.
LockMode could resolve this, if for example I execute Select queries with LockMode.READ?
Thanks,