-
1. Explicit distributed eager locking
brenuart Feb 4, 2011 7:46 AM (in response to brenuart)Back on the subject - found (I guess) the solution
Issue is related to Lock Striping (cfr. http://community.jboss.org/wiki/LockingandConcurrency#Lock_striping)
According to the documentation, lock striping is enabled by default.
Lock striping entails the use of a fixed-size, shared collection of locks for the entire cache, with locks being allocated to entries based on the entry's key's hash code. This means two different keys may share the same lock - which is the case in my example.
I disabled lock striping and my test now runs fine (or at least as expected).
Conclusion: in you fine fine-graine lock, then either disable lock striping or carefully choose your hashcode generation for the keys...
/bertrand
-
2. Explicit distributed eager locking
galder.zamarreno Mar 9, 2011 3:23 AM (in response to brenuart)Guys, I've created a poll in http://community.jboss.org/polls/1073?pollSuccess=true in order to discuss whether to carry on enabling lock striping by default or not. Please vote