[
https://issues.apache.org/jira/browse/CAMEL-5412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pontus Ullgren updated CAMEL-5412:
----------------------------------
Attachment: CAMEL-5412.zip
Unit testcase
> ObjectAlreadyExistsException when "redeploying" routes that uses
> CronScheduledRoutePolicy
> -----------------------------------------------------------------------------------------
>
> Key: CAMEL-5412
> URL: https://issues.apache.org/jira/browse/CAMEL-5412
> Project: Camel
> Issue Type: Bug
> Components: camel-quartz
> Affects Versions: 2.9.2, 2.10.0
> Reporter: Pontus Ullgren
> Attachments: CAMEL-5412.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira