简体   繁体   中英

Quartz application scoped JNDI EJB Lookups

I am working with Quartz 2.1.5 as a Clusterable Scheduler in a Java EE 7 Environment (Wildfly). After a Quartz job is started the job needs to access Java EE session beans. My software is a bit older (no dependency injection was available ) so the job uses jndi lookups to get the session beans. as a jndi lookup I use the portable JNDI Syntax.

java:app[/module name]/enterprise bean name[/interface name]

or

java:global[/application name]/module name/enterprise bean name[/interface name]

I am currently fighting the problem that Quartz does not find the Beans using the application scoped jndi name (java:app) It only can find the session bean using the global jndi variant. For some purposes not explained here I need the application scoped variant to work. My Java EE application is all deployed within a single EAR.

Any ideas why only the global JNDI works?

You need to implement your own org.quartz.spi.ThreadExecutor and/or org.quartz.spi.ThreadPool classes that make use of the javax.enterprise.concurrent package for their implementation.

The JSR 236: Concurrency Utilities for JavaTM will be a useful reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM