I open two recordstores. I create a tread that writes records to one store and then enumerates them. The thread is implemented as an anonymous inner class. The enclosing class has the same code to add records and then enumerate them (in the other record store).
When the code runs the adding of records to the two stores is interleaved - as you might extra from the thread scheduler.
However, when the enumerator in the thread starts to run it always throws an exception - usually an ArrayIndexOutofBounds.
If I comment the code for the enumerator in either the enclosing class or the thread - it works.
Just seems that 2 concurrent enumerators are allowed.
Any one else seen this ?