Hi @shashi_mulugu
Thanks for responding.
we have a list of unique consumable items for the end user on our application. This list of items have unique id.( e.g. we can consider list of seats in a cinema. -- typically the way a table stores the data with unique key).
These we were trying to store in aem nodes with that unique ids.
This is where we are facing issues in solutioning.
For these end user consumable items, what approach can be taken up.
Regards
Bishnu
Basically you are facing the problem of concurrent writes, and you need to handle that situation on your own. The typical approach is handle failing writes and trying to repeat the operation. Depending on the load on the system and the level of parallel writes up to 3 tries can be sufficient, but it can also continue to fail every now and then.
In that case you need to switch to a different strategy and you need to synchronize the writes like this:
synchronized (lockobject) {
resourceresolver.refresh();
dothewrites();
resourceresolver.commit();
}
the refresh is important.