Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-3575

allow ScheduledRoutePolicy to handle more than one action (start, stop, resume, pause)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • camel-quartz
    • None
    • Patch Available

    Description

      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).

      Attachments

        1. ScheduledRoutePolicy-Patch.diff
          5 kB
          Ricardo Veguilla

        Activity

          People

            akarpe Ashwin J. Karpe
            rveguilla Ricardo Veguilla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: