Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.9.2, 2.10.0
-
None
-
Patch Available
-
Unknown
Description
When a route that has a CronScheduledRoutePolicy is removed it does not properly clean up the quartz jobs.
The result (apart from possible memory leak) is that if the route is removed from the context and then readded with the same route id a ObjectAlreadyExistsException.
This is done using the following steps.
1. Stop the route
2. Remove the route (and it's endpoints) from the context.
3. (Re)add the route to the context using the same name.
Attached is a testcase that shows the problem.
I've solved this by adding my own implementation of onRemove (that calls doStop()) to CronScheduledRoutePolicy.