Problem when "redeploying" routes that uses CronScheduledRoutePolicy

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem when "redeploying" routes that uses CronScheduledRoutePolicy

pontus.ullgren
Hello,

We have a application  where we dynamically changes route
configuration by "redeploying" them.

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.

For routes that uses the CronScheduledRoutePolicy the redeploy phase
failes since there are jobs still registered in quartz.

I've solved this by adding my own implementation of onRemove method to
the CronScheduledRoutePolicy and this seems solves this problem.

Test case and modified version of CronScheduledRoutePolicy can be found here:
https://gist.github.com/3004189

Before I go and report this as a issue in Jira I just wanted to check
with the list if this is by design and the problem is in the way I'm
using CronScheduledRoutePolicy ?

Best regards
Pontus Ullgren
Reply | Threaded
Open this post in threaded view
|

Re: Problem when "redeploying" routes that uses CronScheduledRoutePolicy

Charles Moulliard
If you think that we could improve the existing cronScheduler of Camel, please raise a JIRA ticket ("select improvement as issue type") and we will have a look (https://issues.apache.org/jira/browse/CAMEL).

Regards,

Charles
Apache Committer
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Email: [hidden email]
Twitter : @cmoulliard, @fusenews
Blog : http://cmoulliard.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Problem when "redeploying" routes that uses CronScheduledRoutePolicy

Claus Ibsen-2
In reply to this post by pontus.ullgren
Hi

Yes this seems like a bug. Please raise a JIRA ticket and attach a patch.
http://camel.apache.org/contributing.html


On Wed, Jun 27, 2012 at 4:01 PM, Pontus Ullgren <[hidden email]> wrote:

> Hello,
>
> We have a application  where we dynamically changes route
> configuration by "redeploying" them.
>
> 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.
>
> For routes that uses the CronScheduledRoutePolicy the redeploy phase
> failes since there are jobs still registered in quartz.
>
> I've solved this by adding my own implementation of onRemove method to
> the CronScheduledRoutePolicy and this seems solves this problem.
>
> Test case and modified version of CronScheduledRoutePolicy can be found here:
> https://gist.github.com/3004189
>
> Before I go and report this as a issue in Jira I just wanted to check
> with the list if this is by design and the problem is in the way I'm
> using CronScheduledRoutePolicy ?
>
> Best regards
> Pontus Ullgren



--
Claus Ibsen
-----------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|

Re: Problem when "redeploying" routes that uses CronScheduledRoutePolicy

pontus.ullgren
Thanks for the feedback I've now registered this as a JIRA ticket
(https://issues.apache.org/jira/browse/CAMEL-5412).

// Pontus


On Fri, Jun 29, 2012 at 9:54 AM, Claus Ibsen <[hidden email]> wrote:

> Hi
>
> Yes this seems like a bug. Please raise a JIRA ticket and attach a patch.
> http://camel.apache.org/contributing.html
>
>
> On Wed, Jun 27, 2012 at 4:01 PM, Pontus Ullgren <[hidden email]> wrote:
>> Hello,
>>
>> We have a application  where we dynamically changes route
>> configuration by "redeploying" them.
>>
>> 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.
>>
>> For routes that uses the CronScheduledRoutePolicy the redeploy phase
>> failes since there are jobs still registered in quartz.
>>
>> I've solved this by adding my own implementation of onRemove method to
>> the CronScheduledRoutePolicy and this seems solves this problem.
>>
>> Test case and modified version of CronScheduledRoutePolicy can be found here:
>> https://gist.github.com/3004189
>>
>> Before I go and report this as a issue in Jira I just wanted to check
>> with the list if this is by design and the problem is in the way I'm
>> using CronScheduledRoutePolicy ?
>>
>> Best regards
>> Pontus Ullgren
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [hidden email]
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen