Class CdiAwareJob

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

class CdiAwareJob extends Object implements org.quartz.Job
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<? extends org.quartz.Job> jobInstance)
  • 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