Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-641

wicket thread handling is not fully servlet container aware

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-beta1
    • 1.3.0-beta3
    • wicket
    • None

    Description

      I found these issues in wicket:

      (1) org.apache.wicket.util.file.FileCleaner will never terminate it's reaper thread once it has been started
      (2) org.apache.wicket.util.thread.Task will not immediately stop when calling stop() but wait at least until it's next point of execution (which could take very long!)

      In a servlet container, any kind of thread should be killed in WebApplication#destroy or equivalent and terminate as quick as possible / immediately.

      (2) should not rely on the 'stop' variable but use Thread#interrupt and InterruptedException instead.

      IMHO terminating threads in general is done best by using Thread#interrupt as suggested by Sun.

      delaying / ignoring termination of threads could leave stale file locks, continue to use memory and cause other types of resource problems....

      Starting / stopping web applications is not restricted to hot deploy while developing but some production servers are usually not shutdown for re-deployment so this issue could be critical in that case.

      Attachments

        Activity

          People

            jdonnerstag Juegen Donnerstag
            pete Peter Ertl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: