code: public static void initialize() {
  
          if (initialized) return;
  
          SniffyConfiguration.INSTANCE.addTopSqlCapacityListener(new PropertyChangeListener() {
  
              @Override
              public void propertyChange(PropertyChangeEvent evt) {
                  ConcurrentLinkedHashMap<String, Timer> oldValues = globalSqlStats;
                  globalSqlStats =
                          new ConcurrentLinkedHashMap.Builder<String, Timer>().
                                  maximumWeightedCapacity(SniffyConfiguration.INSTANCE.getTopSqlCapacity()).
                                  build();
                  globalSqlStats.putAll(oldValues);
              }
  
          });
  
  
          if (SniffyConfiguration.INSTANCE.isMonitorSocket()) {
  
              try {
                  SnifferSocketImplFactory.install();
              } catch (IOException e) {
                  e.printStackTrace();
              }
  
          } else {
  
              SniffyConfiguration.INSTANCE.addMonitorSocketListener(new PropertyChangeListener() {
  
                  private boolean sniffySocketImplFactoryInstalled = false;
  
                  @Override
                  public synchronized void propertyChange(PropertyChangeEvent evt) {
                      if (sniffySocketImplFactoryInstalled) return;
                      if (Boolean.TRUE.equals(evt.getNewValue())) {
                          try {
                              SnifferSocketImplFactory.install();
                              sniffySocketImplFactoryInstalled = true;
                          } catch (IOException e) {
                              e.printStackTrace();
                          }
                      }
                  }
  
              });
  
          }
  
          initialized = true;
  
      }
docs: If socket monitoring is already enabled it cannot be disabled afterwards
  Otherwise one webapp would enable it but another one would disable