servers[serverIndex].addNotificationListener(on, listener);
servers[serverIndex].getServer().addNotificationListener(on, listener);
   public static void addNotificationListener(int serverIndex, ObjectName on,                                              NotificationListener listener) throws Exception   {      if (killed[serverIndex])      {         log.warn("Server " + serverIndex + " cannot addNotificationListener it has been killed");                  return;      }            insureStarted(serverIndex);      if (isLocal())      {         // add the listener directly to the server         servers[serverIndex].addNotificationListener(on, listener);      }      else      {         // is remote, need to poll         NotificationListenerPoller p =            new NotificationListenerPoller((Server)servers[serverIndex], on, listener);         synchronized(notificationListenerPollers)         {            notificationListenerPollers.put(listener, p);         }         new Thread(p, "Poller for " + Integer.toHexString(p.hashCode())).start();      }   }