Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2539

Deadlock in accessing DistributedReplicantManagerImpl's keyListener collection

    XMLWordPrintable

Details

    Description

      DistributedReplicantManagerImpl maintains a collection of listeners interested in receiving notifications of changes in the replicants registered for a service. The class uses standard callback registration code; ie. synchronizing on the collection before adding/removing listeners, and synchronizing on the collection as part of determining who to call when an event happens (in notifyKeyListeners())..

      The problem is the synchronization on the collection is held throughout the process of notifying the listeners. This increases the possibility of deadlock. I'll describe an example of such a deadlock on a forum thread I'll open for this issue.

      The synchronization block in notifyKeyListeners() is really serving two purposes – serializing the notifications and coordinating access to the collection of listeners. We should separate these two functions, as well as think through the need for the former.

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: