How does JBoss Cache lock data for concurrent access?
In JBoss Cache 2.x, by default pessimistic locking is used to lock data nodes, based on the isolation level configured. We also offer optimistic locking to allow for greater concurrency at the cost of slight processing overhead and performance. See the documentation for a more detailed discussion on concurrency and locking in JBoss Cache. In JBoss Cache 3.x, optimistic and pessimistic locking are deprecated in favour of MVCC (multi-version concurrency control), which is far more efficient than either optimistic or pessimistic locking. For a detailed discussion on our MVCC implementation, see this blog entry andthis wiki page.