Class CdiAwareJob

java.lang.Object
io.quarkus.quartz.runtime.CdiAwareJob
All Implemented Interfaces:
org.quartz.InterruptableJob, org.quartz.Job

class CdiAwareJob extends Object implements org.quartz.InterruptableJob
An abstraction allowing proper destruction of Job instances in case they are dependent beans. According to JobFactory.newJob(TriggerFiredBundle, Scheduler), a new job instance is created for every trigger. We will therefore create a new dependent bean for every trigger and destroy it afterwards.
  • Constructor Details

    • CdiAwareJob

      public CdiAwareJob(jakarta.enterprise.inject.Instance.Handle<? extends org.quartz.Job> handle)
  • Method Details

    • execute

      public void execute(org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
      Specified by:
      execute in interface org.quartz.Job
      Throws:
      org.quartz.JobExecutionException
    • interrupt

      public void interrupt() throws org.quartz.UnableToInterruptJobException
      Specified by:
      interrupt in interface org.quartz.InterruptableJob
      Throws:
      org.quartz.UnableToInterruptJobException