You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <de...@tuscany.apache.org> on 2009/02/19 07:17:01 UTC

[jira] Commented: (TUSCANY-2860) Activating multiple composites on different threads results in ConcurrentModificationException related to DefaultProviderFactoryExtensionPoint

    [ https://issues.apache.org/jira/browse/TUSCANY-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674906#action_12674906 ] 

Raymond Feng commented on TUSCANY-2860:
---------------------------------------

Let me try to describe my understanding:

1) The Tuscany code is shared in the same JVM.
2) Multiple composites are started in parallel (like the concurrent starting of JEE apps)
3) The activation of the 1st composite triggers the lazy loading of the provider factories and the loaded flag is still false.
4) The activation of the 2nd composite races again 3) which causes the ConcurrentModification issue.

we just have to synchronize the loadProviders method and the internal List/Map can leave as-is.

> Activating multiple composites on different threads results in ConcurrentModificationException related to DefaultProviderFactoryExtensionPoint
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2860
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2860
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>            Reporter: Collin Tedlock
>            Assignee: Raymond Feng
>            Priority: Minor
>
> Multiple threads running through composite activation can cause concurrent modification, like so:
> java.util.ConcurrentModificationException
> 	at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:64)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.addImplementationProvider(CompositeActivatorImpl.java:490)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:989)
> DefaultProviderFactoryExtensionPoint seems to be causing the problem.

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