[ 
https://issues.apache.org/jira/browse/TUSCANY-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475066
 ] 

Frank Budinsky commented on TUSCANY-1130:
-----------------------------------------

Hasan, why don't you start by figuring out exactly what shared model(s) the 
threads are competing for. One way to fix it is to make sure that one thread 
initializes the extendedmetadata before the others start. Maybe a finer-grain 
approach is possible (e.g., override SDOExtendedMetaData.getType to syncronize 
calls to it), but first we really need to understand where the problem is. What 
are the other threads doing, if not also creating the helper context?

Thanks,
Frank.

> Concurrent access to SDOUtil.createHelperContext() results in exception
> -----------------------------------------------------------------------
>
>                 Key: TUSCANY-1130
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1130
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-M2
>         Environment: All
>            Reporter: Hasan Muhammad
>             Fix For: Java-M2
>
>         Attachments: 1130.patch
>
>
> In tuscany runtime, when multiple apps are started simultaneously, we get an 
> exception as below: This is a problem with acessing 
> SDOUtil.createHelperContext(0 concurrently.
> Exception = java.util.ConcurrentModificationException
> Source = com.ibm.ws.soa.sca.admin.config.loader.SDOLoader.<INIT>
> probeid = 80
> Stack Dump = java.util.ConcurrentModificationException: concurrent access to 
> HashMap attempted by Thread[server.startup : 2,5,main]
>         at java.util.HashMap.onExit(HashMap.java:217)
>         at java.util.HashMap.transfer(HashMap.java:514)
>         at java.util.HashMap.resize(HashMap.java:500)
>         at java.util.HashMap.addEntry(HashMap.java:800)
>         at java.util.HashMap.put(HashMap.java:441)
>         at 
> com.ibm.sdo.internal.ecore.util.BasicExtendedMetaData$EPackageExtendedMetaDataImpl.getType(BasicExtendedMetaData.java:2064)
>         at 
> com.ibm.sdo.internal.ecore.util.BasicExtendedMetaData.getType(BasicExtendedMetaData.java:115)
>         at 
> com.ibm.sdo.internal.xsd.ecore.XSDEcoreBuilder.populateTypeToTypeObjectMap(XSDEcoreBuilder.java:108)
>         at 
> org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.<init>(SDOXSDEcoreBuilder.java:61)
>         at 
> org.apache.tuscany.sdo.helper.XSDHelperImpl.<init>(XSDHelperImpl.java:79)
>         at 
> org.apache.tuscany.sdo.helper.XSDHelperImpl.<init>(XSDHelperImpl.java:94)
>         at 
> org.apache.tuscany.sdo.helper.HelperContextImpl.<init>(HelperContextImpl.java:48)
>         at 
> org.apache.tuscany.sdo.helper.HelperContextImpl.<init>(HelperContextImpl.java:52)
>         at 
> org.apache.tuscany.sdo.util.SDOUtil.createHelperContext(SDOUtil.java:299)

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to