-
Bug
-
Resolution: Won't Do
-
Neutral
-
1.2
"Macro" problem: if you have the observation module in your Magnolia and restart the webapp a few times (without stopping the application server), you will notice that with each restart a bunch of threads are left "orphaned" by the observation module, thus wasting the thread pool.
The root of the problem is that deeply down, the Obervation module uses the ClockDaemon class (from oswego) as handler for delayed operations. This class has a shutDown() method which unfortunately is never called, so if the thread is not catched by garbage colletion is left there forever.
A possible solution for the problem is to add a shutdown method in the DelayedExecutor class (that would call the ClockDaemon.shutdown), and then a corresponding shutdown up to the call chain (ObservationBasedDelayedExecutor, DeferringEventListener). With this it will be possible to call that shutdown method when unregistering an event listener in ObservationUtil.unregisterChangeListener.
If all the listener are correctly unregistered during application shutdown (which seems to be the case), there won't be leftover threads.
- is related to
-
MAGNOLIA-4456 Leftover Jackrabbit thread after shutdown.
- Closed