You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2010/03/29 23:52:27 UTC

[jira] Updated: (OPENEJB-1248) DiscoveryRegistry doesn't work (ConcurrentModificationException)

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

David Jencks updated OPENEJB-1248:
----------------------------------

    Attachment: OPENEJB-1248.patch

Patch from inside server that fixes the immediate problem I had and should be OK as far as agents and listeners, but not the stuff already in concurrent maps.

> DiscoveryRegistry doesn't work (ConcurrentModificationException)
> ----------------------------------------------------------------
>
>                 Key: OPENEJB-1248
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1248
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1.x
>            Reporter: David Jencks
>             Fix For: 3.1.x
>
>         Attachments: OPENEJB-1248.patch
>
>
> I get:
> Module 35/41 org.apache.geronimo.configs/openejb-deployer/3.0-SNAPSHOT/car          Exception in thread "Multicast Discovery Agent Notifier" java.util.ConcurrentModificationException
>         at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
>         at java.util.AbstractList$Itr.next(AbstractList.java:343)
>         at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>         at org.apache.openejb.server.DiscoveryRegistry.serviceAdded(DiscoveryRegistry.java:121)
>         at org.apache.openejb.server.discovery.MulticastDiscoveryAgent$Listener$3.run(MulticastDiscoveryAgent.java:437)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:637)
> Looking at the code it clearly needs a lot of synchronization.  Perhaps the author thought that 
>     List<DiscoveryListener> getListeners(){
>         return Collections.unmodifiableList(listeners);
>     }
> would copy the list of listeners instead of providing a view that reflects all changes to the underlying list.

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