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

David T. Adcox updated TUSCANY-1574:
------------------------------------

    Attachment: 1574.patch

This patch embodies the changes described in the body of this JIRA.  

> SDOXSDEcoreBuilder.createResourceSet() is not thread safe
> ---------------------------------------------------------
>
>                 Key: TUSCANY-1574
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1574
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-1.0
>         Environment: n/a
>            Reporter: David T. Adcox
>             Fix For: Java-SDO-Next
>
>         Attachments: 1574.patch
>
>
> The method createResourceSet() in SDOXSDEcoreBuilder is not thread safe.  It 
> performs an enumeration of EPackage resource objects and adds them to the 
> ResourceSet created within the method.  The problem is that a ResourceSet 
> object is a container.  So, when the Resource objects are added with this 
> statement:
>         resources.add(resource);
> EMF attempts to first unlink the resource from its previous container.  That 
> in itself is an issue, but beyond that, during a stress run, the unlinking 
> can occur simultaneously on multiple threads, causing exceptions.  This code 
> was added for Tuscany-513.  I'm not clear what are the goals, but I was 
> wondering if we can accomplish the same task in another manner.  The goal 
> seems to be to expose the newly created ResourceSet to the built-in models.  
> Perhaps this pattern from DataObjectUtil.configureResourceSet would work:
> resourceSet.setPackageRegistry(new 
> EPackageRegistryImpl(HelperContextImpl.getBuiltInModelRegistry()));
> Would this line of code accomplish a similar function?

-- 
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