You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Hasan Muhammad (JIRA)" <tu...@ws.apache.org> on 2007/03/15 17:31:09 UTC

[jira] Updated: (TUSCANY-1179) Race condition due to lazy metada initialization when SDO is shared across threads for read intent

     [ https://issues.apache.org/jira/browse/TUSCANY-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hasan Muhammad updated TUSCANY-1179:
------------------------------------

    Attachment: CreateDataObjectMultiThreadedTestCase.java
                1179.patch

I have attached the patch which resolves this issue.

I have also attached a testcase CreateDataObjectMultiThreadedTestCase.java: This testcase requires the GroboUtils.jar which is a Junit extension to develop MultiThreaded testcase. You can obtain it from http://groboutils.sourceforge.net/

> Race condition due to lazy metada initialization when SDO is shared across threads for read intent
> --------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1179
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1179
>             Project: Tuscany
>          Issue Type: Bug
>         Environment: ALL
>            Reporter: Hasan Muhammad
>         Attachments: 1179.patch, CreateDataObjectMultiThreadedTestCase.java
>
>
> 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)
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org