geode-core/src/main/java/org/apache/geode/admin/jmx/internal/StatisticResourceJmxImpl.java
@Override
  public void handleNotification(Notification notification, Object hb) {
    AdminDistributedSystemJmxImpl adminDSJmx =
        (AdminDistributedSystemJmxImpl) member.getDistributedSystem();

    String typeStatResourceStats = RefreshNotificationType.STATISTIC_RESOURCE_STATISTICS.getType();

    if (typeStatResourceStats.equals(notification.getType())
        && getMBeanName().equals(notification.getUserData())
        && !adminDSJmx.isRmiClientCountZero()) {
      try {
        refresh();

      } catch (org.apache.geode.admin.AdminException e) {
        logger.warn(e.getMessage(), e);
      } catch (org.apache.geode.admin.OperationCancelledException e) {
        // underlying resource is no longer reachable by remote admin
        logger.warn(e.getMessage(), e);
        _setRefreshInterval(0);
      } catch (CancelException e) {
        // shutting down - okay to ignore
      } catch (java.lang.RuntimeException e) {
        logger.debug(e.getMessage(), e); // dead in water, print, and then ignore
        _setRefreshInterval(0); // zero out to avoid more exceptions
      } catch (VirtualMachineError err) {
        SystemFailure.initiateFailure(err);
        // If this ever returns, rethrow the error. We're poisoned
        // now, so don't let this thread continue.
        throw err;
      } catch (java.lang.Error e) {
        // Whenever you catch Error or Throwable, you must also
        // catch VirtualMachineError (see above). However, there is
        // _still_ a possibility that you are dealing with a cascading
        // error condition, so you also need to check to see if the JVM
        // is still usable:
        SystemFailure.checkFailure();
        logger.error(e.getMessage(), e); // dead in water, print, and then ignore
        refreshInterval = 0; // zero out to avoid more exceptions
      }
    }
  }
/**
   * Handles notification to refresh. Reacts by refreshing the values of this SystemMember's
   * ConfigurationParamaters. Any other notification is ignored. Given notification is handled only
   * if there is any JMX client connected to the system.
   * <p>
   * TODO: investigate use of NotificationFilter instead of explicit check...
   *
   * @param notification the JMX notification being received
   * @param hb handback object is unused
   */
Handles notification to refresh. Reacts by refreshing the values of this SystemMember's
ConfigurationParamaters. Any other notification is ignored. Given notification is handled only
if there is any JMX client connected to the system.

TODO: investigate use of NotificationFilter instead of explicit check

@param notification the JMX notification being received
@param hb handback object is unused
Handles notification to refresh . Reacts by refreshing the values of this SystemMember ' s ConfigurationParamaters . Any other notification is ignored . Given notification is handled only if there is any JMX client connected to the system . TODO : investigate use of NotificationFilter instead of explicit check @param notification the JMX notification being received @param hb handback object is unused
@Override
  public void handleNotification(Notification notification, Object hb) {
    AdminDistributedSystemJmxImpl adminDSJmx =
        (AdminDistributedSystemJmxImpl) member.getDistributedSystem();
    String typeStatResourceStats = RefreshNotificationType.STATISTIC_RESOURCE_STATISTICS.getType();
    if (typeStatResourceStats.equals(notification.getType())
        && getMBeanName().equals(notification.getUserData())
        && !adminDSJmx.isRmiClientCountZero()) {
      try {
        refresh();
      } catch (org.apache.geode.admin.AdminException e) {
        logger.warn(e.getMessage(), e);
      } catch (org.apache.geode.admin.OperationCancelledException e) {
        logger.warn(e.getMessage(), e);
        _setRefreshInterval(0);
      } catch (CancelException e) {
      } catch (java.lang.RuntimeException e) {
        logger.debug(e.getMessage(), e); 
        _setRefreshInterval(0); 
      } catch (VirtualMachineError err) {
        SystemFailure.initiateFailure(err);
        throw err;
      } catch (java.lang.Error e) {
        SystemFailure.checkFailure();
        logger.error(e.getMessage(), e); 
        refreshInterval = 0; 
      }
    }
  }
@ Override public void handleNotification ( Notification notification , Object hb ) { AdminDistributedSystemJmxImpl adminDSJmx = ( AdminDistributedSystemJmxImpl ) member . getDistributedSystem ( ) ; String typeStatResourceStats = RefreshNotificationType . STATISTIC_RESOURCE_STATISTICS . getType ( ) ; if ( typeStatResourceStats . equals ( notification . getType ( ) ) && getMBeanName ( ) . equals ( notification . getUserData ( ) ) && ! adminDSJmx . isRmiClientCountZero ( ) ) { try { refresh ( ) ; } catch ( org . apache . geode . admin . AdminException e ) { logger . warn ( e . getMessage ( ) , e ) ; } catch ( org . apache . geode . admin . OperationCancelledException e ) { logger . warn ( e . getMessage ( ) , e ) ; _setRefreshInterval ( 0 ) ; } catch ( CancelException e ) { } catch ( java . lang . RuntimeException e ) { logger . debug ( e . getMessage ( ) , e ) ; _setRefreshInterval ( 0 ) ; } catch ( VirtualMachineError err ) { SystemFailure . initiateFailure ( err ) ; throw err ; } catch ( java . lang . Error e ) { SystemFailure . checkFailure ( ) ; logger . error ( e . getMessage ( ) , e ) ; refreshInterval = 0 ; } } }
Handles notification to refresh.
Handles notification to refresh .
// underlying resource is no longer reachable by remote admin // shutting down - okay to ignore // dead in water, print, and then ignore // zero out to avoid more exceptions // If this ever returns, rethrow the error. We're poisoned // now, so don't let this thread continue. // Whenever you catch Error or Throwable, you must also // catch VirtualMachineError (see above). However, there is // _still_ a possibility that you are dealing with a cascading // error condition, so you also need to check to see if the JVM // is still usable: // dead in water, print, and then ignore // zero out to avoid more exceptions