Clone
Horia Chiorean
committed
on 07 Mar 17
MODE-2670 Changes the implementation of the internal repository locking The new lock implementation uses a bare-bone AbstractQueuedSynchroni… Show more
MODE-2670 Changes the implementation of the internal repository locking The new lock implementation uses a bare-bone AbstractQueuedSynchronizer implementation because in ModeShape's case locks have to be able to be unlocked from other threads than the owning threads (transaction rollbacks). The previous ReentrantLock implementation would obviously not work.

This commit also changes the way the persistence stores deal with transactions: instead of holding onto the "current" transaction via a ThreadLocal variable, they will now rely on their internal mapping of tx ids. This is provided by ModeShape for each transaction. Therefore, thread-locality is no longer an issue.

The commit further changes some of the ways in which internal transactions are used during repository startup, making sure some operations are grouped and some - the preconfigured workspaces - are created up-front within a single transaction.

Show less

5.4.x + 7 more