[ 
https://issues.apache.org/jira/browse/CAMEL-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987278#action_12987278
 ] 

Ashwin Karpe edited comment on CAMEL-3575 at 1/26/11 6:12 PM:
--------------------------------------------------------------

Hi,

I am not sure that this is an issue... It is indeed possible to set a start and 
stop time using a single policy for a given route. The only difference is that 
it sets two separate triggers to handle the start and stop based on my 
understanding. I will create unit tests to test if this is an issue and 
validate this behavior and if needed use the patch above to fix it if it does 
the trick.

The patch above is missing unit tests to validate that it indeed works...

There is however a problem in being able to apply multiple policies (policy 
lists on a given route in CAMEL-3254).

I will be working on this over the next few days and will apply a fix for this 
as well as CAMEL-3254 in 2.7.0, following the release of 2.6.0

Cheers,

Ashwin...

P.S: Please hold off on applying the above patch...


      was (Author: akarpe):
    Hi,

I am not sure that this is an issue... It is indeed possible to set a start and 
stop time using a single policy for a given route. The only difference is that 
it sets two separate triggers to handle the start and stop.

Also it seems like the patch is missing unit tests to validate that the patch 
works...

There is indeed a problem in being able to apply multiple policies (policy 
lists on a given route in CAMEL-3254).

I will be working on this over the next few days and will apply a fix for this 
and CAMEL-3254 in 2.7.0, following the release of 2.6.0

Cheers,

Ashwin...

P.S: Please hold off on applying the above patch...

  
> allow ScheduledRoutePolicy to handle more than one action (start, stop, 
> resume, pause)
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3575
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3575
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-quartz
>    Affects Versions: 2.6.0
>            Reporter: Ricardo Veguilla
>             Fix For: 2.7.0
>
>         Attachments: ScheduledRoutePolicy-Patch.diff
>
>
> The current implementation of ScheuledRoutePolicy only supports one type of 
> action (start,stop,resume,pause) for only one route.  If, for example,  you 
> attempt to configure a CronScheduleRoutePolicy with a routeStartTime and 
> routeStopTime, only the one will by handled because ScheduleRoutePolicy 
> (super-class of CronScheduleRoutePolicy) only store one action and one route 
> in the SchedulerContext:
>  protected void loadCallbackDataIntoSchedulerContext(Action action, Route 
> route) throws SchedulerException {
>        getScheduler().getContext().put(SCHEDULED_ACTION, action);
>         getScheduler().getContext().put(SCHEDULED_ROUTE, route);
> }
> with the effect of creating two timers (one for startTime, the other for 
> stopTime) that execute the same action (the last call to scheduleRoute).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to