Handling Stale Data

While using ADF one internal feature of ADF model is Data Caching. So for neseted application modules sometimes it makes problems like RowInconsistentException.

To remove that we can use setClearCacheOnCommit.
By default its value is false.

But if we make it true it will clear the previous cache on every commit. So the data updated by other users always get updated.

It can be done by two ways.

1. Open the ApplicationModule.xml in source mode. and set the ClearCacheOnCommit=”true”

or
2. If AppModuleImpl.java is created use the following code there.

this.getDBTransaction().setClearCacheOnCommit(true); in constructor.

This should solve the problems like Stale Data.

Leave a Comment