Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.0
-
Component/s: Framework Core, Web Application
-
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
| This issue fixes: | ||||
| CARROT-391 | RejectedExecutionException when running all document source tests in a batch |
|
|
|
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.