Commons JCS
  1. Commons JCS
  2. JCS-90

When issuing a shutDown() command, JCS fails to clean up the Queue Processor thread. This can lead to thread leakage in an environment where webapps are hot-deployed and hot-undeployed.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: jcs-1.3
    • Fix Version/s: jcs-2.0-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      When a shutDown() command is issued to CompositeCacheManager, the the CompositeCache.eventProcessorQ thread is not disposed of, leading to thread leakage in environments where the JVM doesn't exit immediately after issuing the shutdown. This is the case in environments where web applications are hot-deployed or hot-undeployed.

      Similarly, the "graceful termination" implemented utilizes Thread.destroy(), which was never implemented, so there's nothing graceful about a NoSuchMethodError(). This has been changed to be a truly graceful exit (i.e. break out of the loop so that the method can return cleanly).

      A patch to fix will be attached shortly.

        Activity

        Diego Rivera created issue -
        Hide
        Diego Rivera added a comment -

        This patch fixes the cleanup of the event processor queue thread upon issuing an explicit shutDown() command to the CompositeCacheManager instance.

        Show
        Diego Rivera added a comment - This patch fixes the cleanup of the event processor queue thread upon issuing an explicit shutDown() command to the CompositeCacheManager instance.
        Diego Rivera made changes -
        Field Original Value New Value
        Attachment jcs-90-fix.patch [ 12512330 ]
        Thomas Vandahl made changes -
        Assignee Thomas Vandahl [ tv ]
        Hide
        Thomas Vandahl added a comment -

        Modified fix applied.

        Show
        Thomas Vandahl added a comment - Modified fix applied.
        Thomas Vandahl made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s jcs-1.4-dev [ 12312535 ]
        Resolution Fixed [ 1 ]
        Hide
        Thomas Vandahl added a comment -

        Close after release

        Show
        Thomas Vandahl added a comment - Close after release
        Thomas Vandahl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        64d 18h 54m 1 Thomas Vandahl 02/Apr/12 12:38
        Resolved Resolved Closed Closed
        1094d 3h 12m 1 Thomas Vandahl 01/Apr/15 15:50

          People

          • Assignee:
            Thomas Vandahl
            Reporter:
            Diego Rivera
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development