This is a backport of the fix for CMR Iterator race
condition which caused IllegalStateExceptions under
load. The root of the problem (see jboss-user thread
"CMR error under load") appears to be that when CMR
methods are marked read-only, and there is a high
volume of requests into the method, threads nullify
each other's handle, which is what the anonymous
Iterator class uses to validate that' its being invoked
by the same tx which created the CMR set. The end
result is random IllegalStateExceptions which complain
that the iterator is being accesed by a tx other than
the one which created the set.
The fix consisted of creating a read-only RelationSet
snapshot when the CMR method is marked read only.
I have tested this succesfully on 3.0.6 under heavy
load, and found it to work perfectly.
Read Only CMR diffs