I am facing data inconsistency with EJB2.1 Implementation. We are using WAS6.1 with 2 JVMs per channel (we have 5 channels and two app server so total 20 JVMS). To avoid load on DB we are caching data into JVM. However it happens that for one cache type one JVM has 30 records and other JVM gets 28 records.
e.g below are the entries exist in DB
After debugging we found that for missing records code is looping previously fetched record again. Say in first attempt for code ABC it reads fromdate as 2014-12-31 then in next attempt it reads again 2014-12-31, so it miss one record.
If we run loadcache job again then this issue gets resolved. Its happening on intermittent basis.
We are using EJB2.1 with CMP2.x. As we are using container managed persistence, code is auto generated at deployment time.
Can you please let me know if this is known behaviour of CMP for distributed env or any solution to fix it.