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

DistributedReplicantManager does not honor jmx service dependencies when notifiyng a node removal

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • JBossAS-4.0.2 Final
    • Clustering
    • None
    • Jboss 4.0.2,
      WinXP
      JDK 1.5

      We are using some HASingletonServices. These services use the HAJNDI tree to lookup other services.

      Both the HASingletonservices and the HAJNDI service are notified if a node (eg the master) is removed from the cluster. However, the order seems to be random. If the master goes down, the HASingletonservce seems to be notified first. It tries to start the singleton on another host. While starting, it uses the HAJNDI, but this one still tries to connect to the old server, leading to NamingExceptions.
      Since i added a jmx depencency from the singleton service to HAJNDI, i would expect that the HAJNDI gets notified first. That would fix my problem.

      I looked in the code of the DistributedReplicantManagerImpl and it seems that this one does not keep track of the order in which keys are registered. I quickly changed all HashMap and HashSet instantiations of this class to LinkedHashMap and LinkedHashSet instantiations, and now my problem is fixed.

              bstansbe@redhat.com Brian Stansberry
              janssk1_jira janssk1 (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: