Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1248

DiscoveryRegistry doesn't work (ConcurrentModificationException)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Abandoned
    • 3.1.x
    • 3.1.x
    • None
    • None

    Description

      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.

      Attachments

        1. OPENEJB-1248.patch
          3 kB
          David Jencks

        Activity

          People

            Unassigned Unassigned
            djencks David Jencks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: