2 Replies Latest reply on May 31, 2006 2:19 PM by mazz

    not receiving UPDATED network registry notifs

    mazz Master

      What would cause a network registry from not sending an UPDATED notification if a server invoker goes down?

      I have a unit test that starts (in the same VM) two servers. They each have different invoker locator URLs - they run in the same VM - and they live in different MBeanServers.

      My unit test successfully installs a notification listener and that listener successfully sees the ADDED and UPDATED messages when I start up both servers. I first get the ADDED notification after I start the first server invoker - it indicates that my VM is seen as a new server that came online. The second UPDATED notification is sent once I start that second server - it updates my server VM with the second server invoker.

      However, once the unit test shuts down the second server invoker and sleeps for up to 20 seconds, it still never receives an UPDATED notification to indicate that second invoker is down? I was assuming I would get an UPDATED notification once a server invoker (i.e a Connector) is shutdown.

      Is that not true? What is supposed to happen if my server VM has multiple Connectors and one of those Connectors is shutdown? Does a network notification get emitted or no?

        • 1. Re: not receiving UPDATED network registry notifs
          Tom Elrod Master

          This sounds like a bug, so if can add the test case to remoting testsuite and open a jira issue, I'll look at it.

          Remoting detection is actually pretty simple in implementation. Every few seconds (or whatever the heartbeat period is set for), a detector will emit its detection message (which contains an array of the invokers it sees locally at that point in time). The detector that receives this detection message will check its internal list of detection messages and check to see if the hash of the previous detection message is different from the one it just got. If so, will tell the NetworkRegistry that an update has occured (which then emits the UPDATED notification). The hash is calculated by simply adding the hash codes of all the invokers in they array within the detection message.

          My guess there is a problem within calculating the hash in this case.