Package io.quarkus.quartz.runtime
Class CdiAwareJob
java.lang.Object
io.quarkus.quartz.runtime.CdiAwareJob
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionCdiAwareJob
(jakarta.enterprise.inject.Instance<? extends org.quartz.Job> jobInstance) -
Method Summary
-
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 interfaceorg.quartz.Job
- Throws:
org.quartz.JobExecutionException
-