I would like to know if it is possible to use CDI beans in Quartz jobs in a portable way?
I have already tried to write my own JobFactory and so on, but the problem is, that the BeanManager is not available through JNDI, because the job runs in a non managed thread. My application server is Websphere 8.0.0.1 and I already read that it is against the EE6 spec to make the name "java:" available to non managed threads.
There are two solutions now I think:
I know that, when I use the CDI solution, then I am not able to let the worker threads run in a different JVM, correct me if I am wrong. To stay scaleable I should implement an EJB for that? What do you think, have you ever had that problem? I would also appreciate different solutions or even suggestions on different scheduler libraries!
Look at DeltaSpike scheduler module.
You can find last version on Maven Central Repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With