Note that there are some explanatory texts on larger screens.

plurals
  1. POcan I use CDI injection into quartz-scheduler jobs?
    primarykey
    data
    text
    <p>I'm using Glassfish and CDI for injection, (mostly) successfully. I can't seem to get Quartz jobs to work with injection- beans annotated with <code>@Inject</code> never get injected.</p> <p>Is Quartz using some kind of different classloader that's preventing injection from happening? </p> <p>I'm configuring Quartz like so in my web.xml:</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;quartz:config-file&lt;/param-name&gt; &lt;param-value&gt;quartz.properties&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;quartz:shutdown-on-unload&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;quartz:wait-on-shutdown&lt;/param-name&gt; &lt;param-value&gt;false&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;quartz:start-scheduler-on-load&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/context-param&gt; &lt;listener&gt; &lt;listener-class&gt; org.quartz.ee.servlet.QuartzInitializerListener &lt;/listener-class&gt; &lt;/listener&gt; </code></pre> <p>My quartz.properties looks like:</p> <pre><code>org.quartz.scheduler.instanceName = MyScheduler org.quartz.scheduler.instanceId = 1 org.quartz.scheduler.rmi.export = false org.quartz.scheduler.rmi.proxy = false org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 3 org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin org.quartz.plugin.jobInitializer.fileNames = quartz-config.xml org.quartz.plugin.jobInitializer.scanInterval = 10 org.quartz.plugin.jobInitializer.wrapInUserTransaction = false org.quartz.plugin.jobInitializer.failOnFileNotFound = true </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload