As per this document, when dealing with multiple threads we'd have to create one session for each thread:
Does this still apply with the latest JackRabbit Oak used in 6.3 and above?
Solved! Go to Solution.
Thanks. There's still nothing about shared sessions there.
Found this link:
And as pointed out there, it does give the exception related to concurrent use of a session when I try to use the same session with multiple threads.
In that case, it's supposed to serialize the thread access but weirdly the time taken with shared sessions and with separate sessions and multiple threads are very similar. Hmm...
@Jörg_Hoh : Any thoughts?