Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-534

Mark threads as daemon in order to allow the JVM to exit properly

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.9.2
    • 2.9.0
    • None
    • None

      Sometimes we can shutdown a tomcat instance properly, sometimes we need to kill the java process.
      This is because there are "user" threads running inside the JVM.
      These threads are called "user" when there are created using new Thread() or new TImer() but they can be turned into daemon threads using:

      Thread t = new Thread();
      t.setDaemon(true);
      ...
      new Timer(true);
      

      For more information see:
      http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html#setDaemon(boolean)

            yabon Sébastien Launay (Inactive)
            yabon Sébastien Launay (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: