Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-31700

Warn when a stateful job uses the non-stateful wrapper.

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.1
    • Fix Version/s: 11.2, 12.0
    • Component/s: Quartz Scheduler
    • Labels:
      None
    • 11 status:
      Resolved

      Description

      When you wrap a Spring bean in a Sakai quartz jobs scheduler wrapper so that you can execute it there are 2 wrappers you can use. One is the standard one org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper and the other tells quartz that only one copy of the job can be run across the cluster at once and the job map should be persisted between runs: org.sakaiproject.component.app.scheduler.jobs.SpringStatefulJobBeanWrapper

      You don't have to implement the StatefulJob at all in any Sakai jobs because as long as you use the correct wrapper it will all just work, however lots of Sakai jobs do implement it as it makes the intention of the code clearer. It also will be picked up by quartz when we drop the wrappers.

      Locally we had an instance where we didn't use the correct wrapper for a stateful jobs and one way to catch this is to have the standard wrapper warn if it's running a stateful job.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                buckett Matthew Buckett
                Reporter:
                buckett Matthew Buckett
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration