D
D
Dmitry Osipov2018-10-30 11:58:20
Java
Dmitry Osipov, 2018-10-30 11:58:20

How to stop creating FileWatchdog threads?

A java application is launched in a separately installed tomcat When the method is called , the
FileWatchdog thread is launched, which remains hanging after the method completes log4j version 1.2.17 Unable to change Question: how can I stop creating unnecessary threads or even disable this hot swap feature? As a temporary solution, when running the method, the following code is used:

@SuppressWarnings("deprecation")
  public static void fileWatchdogDestroy() {
    log.info("start fileWatchdogDestroy() ");

    for (Thread t : Thread.getAllStackTraces().keySet()) {
      if (t.getName().equals("FileWatchdog")) {
        log.info("Found FileWatchdog thread.  Killing it");
        t.stop();
      }
    }
  }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question