Hi, The CAS is not designed for concurrent access, to my knowledge, but perhaps others can comment more on this.
Most scale-out use-cases are designs which also scale out the CASes. We would be interested in hearing about a use case which motivates multi-threaded access to a single CAS. -Marshall On 6/15/2010 1:35 PM, Erwan Moreau wrote: > Hello, > > I experience problems using several threads which read annotations in > the same (default) CAS index, inside the same call to the process > method. Since I'm new to UIMA I'm not sure how to interpret that: normal > behaviour due to wrong usage or bug ? The exception stack is: > > java.lang.IndexOutOfBoundsException: Index: 0, Size: 3 > at java.util.ArrayList.RangeCheck(ArrayList.java:547) > at java.util.ArrayList.get(ArrayList.java:322) > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.initPointerIterator(FSIndexRepositoryImpl.java:628) > > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.<init>(FSIndexRepositoryImpl.java:636) > > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.<init>(FSIndexRepositoryImpl.java:612) > > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl.createPointerIterator(FSIndexRepositoryImpl.java:158) > > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl$IndexImpl.iterator(FSIndexRepositoryImpl.java:792) > > at > org.apache.uima.cas.impl.AnnotationIndexImpl.iterator(AnnotationIndexImpl.java:97) > > at > fr.lipn.uima.testing.TestConcurrentCASAccesAE.getFSIterator(TestConcurrentCASAccesAE.java:59) > > > I managed to isolate the problem and wrote a simple AE to explain/show > it (attached). > > Thanks for your help (and sorry if I missed something in the doc !) > > Erwan > > >
