Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
ALL
-
Patch Available
Description
An a DataObject is being shared across multiple threads for read-only purpose ( no modification), due to lazy metadata initialization, we have a race condition which results in different exceptions at different times ( ConcurrentModificationException, NoSuchElementException). The following is one trace;
java.util.ConcurrentModificationException
at org.eclipse.emf.common.util.BasicEList$EIterator.checkModCount(BasicEList.java:1327)
at org.eclipse.emf.common.util.BasicEList$EIterator.next(BasicEList.java:1275)
at org.apache.tuscany.sdo.impl.ClassImpl.initAliasNames(ClassImpl.java:404)
at org.apache.tuscany.sdo.impl.ClassImpl.getProperty(ClassImpl.java:423)
at org.apache.tuscany.sdo.util.DataObjectUtil.get(DataObjectUtil.java:731)
at org.apache.tuscany.sdo.impl.DataObjectImpl.get(DataObjectImpl.java:216)
at org.apache.tuscany.sdo.impl.DataObjectImpl.getDataObject(DataObjectImpl.java:326)
at org.apache.tuscany.sdo.test.CreateDataObjectMultiThreadedTestCase$CreateDataObjectMultiThread.runTest(CreateDataObjectMultiThreadedTestCase.java:67)
at net.sourceforge.groboutils.junit.v1.TestRunnable.run(TestRunnable.java:154)
at java.lang.Thread.run(Thread.java:797)