How to avoid concurrent use of sessions?
I utilize a session to copy images from one folder to another, and at the same time there is workflow which is triggered whenever any node is created under that folder.
One of the workflow's process steps uses a session to edit a property of the newly generated node, which raises the following warning:
06.04.2023 13:54:16.472 *WARN* [Apache Sling Resource Resolver Finalizer Thread] org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate Attempted to perform logout while thread JobHandler: /var/workflow/instances/server2/2023-04-06/torrid-amplience-update-asset_692:/content/dam/torrid/pdp-assets/402/250/40225019/40225019_av1.jpg/jcr:content/renditions/original was concurrently writing to this session. Blocked until the other thread finished using this session. Please review your code to avoid concurrent use of a session.
Any assistance with this matter would be greatly appreciated.
Thanks,
Nandan