Carrot2

Improve management of static ExecutorService fields.

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.0
  • Labels:
    None

Description

Document sources have internal static ExecutorService instances for running queries to search engines. These instances are shared among all instances of a given component and are beyond the scope of the controller. Thus, they are never cleaned properly and never shut down, holding references to context class loader and preventing web applications from fully unloading.

There are two things to improve upon:

  • do we really need separate thread pools for every component? In certain scenarios (service provider limitations) this seems sensible, whereas in general it generates a lot of idle threads.
  • how to cleanup and shut down executor services with the controller (especially with the caching controller).

Issue Links

Activity

Hide
Dawid Weiss added a comment -

Code refactored, introduced controller-shared context for use by component classes. This way component classes may initialize shared resources and properly clean up after the controller is destroyed.

Show
Dawid Weiss added a comment - Code refactored, introduced controller-shared context for use by component classes. This way component classes may initialize shared resources and properly clean up after the controller is destroyed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: