Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5049

Scheduled tasks should set a meaningful thread name during execution

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Commons Scheduler 2.4.10
    • Commons Scheduler 2.4.12
    • None
    • None
    • Patch

    Description

      It would be useful for log file analysis purposes to set a meaningful thread name during the execution of scheduled tasks (https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html). Both Sling requests and jobs do this already: Requests set Method + URL, Jobs set the name to pool id + queue name + topic. For scheduled tasks I would propose to reuse "QuartzJobScheduler.JobName" that is already used internally (and is derived by OSGi service property "scheduler.name"). This can fairly easily be achieved by a few lines of code in QuartzJobExecutor, see attached patch.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            henzlerg Georg Henzler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: