public void run(){
  ClusterResourceNotification notification;
  int warningCount=0;
  do {
    try {
      notification=notifications.take();
      notifyListeners(notification);
    }
 catch (    InterruptedException i) {
      logger.warn("Interrupted while waiting for a notification");
      warningCount++;
    }
catch (    ResourceNotificationException r) {
      logger.warn("Exception while processing notifications" + r);
      warningCount++;
    }
  }
 while (warningCount < MAX_WARNINGS);
  logger.fatal("The maximum number of warnings has been exceeded. Exiting...");
  System.exit(1);
}

public void run ( ) { ClusterResourceNotification notification ; int warningCount = 0 ; do { try { notification = notifications . take ( ) ; notifyListeners ( notification ) ; } catch ( InterruptedException i ) { logger . warn ( "Interrupted while waiting for a notification" ) ; warningCount ++ ; } catch ( ResourceNotificationException r ) { logger . warn ( "Exception while processing notifications" + r ) ; warningCount ++ ; } } while ( warningCount < MAX_WARNINGS ) ; logger . fatal ( "The maximum number of warnings has been exceeded. Exiting..." ) ; System . exit ( 1 ) ; }
run start the listener thread . it turns out that group communications don ' t really need a separate thread since the group comm adapters have their own threads . so we start group comm instead .
