简体   繁体   中英

Upgrade to Quartz 1.6 on JBoss 4.2.x

Is there a recommended way to upgrade Quartz in JBoss 4.2.x?

JBoss bundles quartz 1.5.2, but I have encountered issues ( QUARTZ-399 , QUARTZ-520 ) that I want to avoid.

I would not want to patch quartz.jar in JBoss just to resolve the errors, but instead provide a new quartz.jar (plus associated configuration artifacts). The Quartz 1.6 migration notes only contain information specific to Quartz, and I could not find any additional information during my search.

It does not seem to work to just put the new quartz.jar into the EAR file, because the old version is loaded at the server level (in the server's lib directory).

I am quite sure somebody has already tried that, and hope that this person could share or provide some links.

You could include Quartz 1.6 in your WAR or EAR, and your application will use that instead. However, only the application components within that WAR or EAR will use the new JAR, which may be a problem or an advantage, depending on how you've set up your deployments.

After trying around following skaffman's comments, I have found a very simple solution that does not involve changing JBoss' class loading behavior. Simply replacing the quartz.jar in ${jboss.server.dir}/lib with quartz 1.6 does the job, and I haven't had any problems yet.

Restarting shows the following output:

[QuartzScheduler] Quartz Scheduler v.1.6.0 created.
[RAMJobStore] RAMJobStore initialized.
[StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from an externally provided properties instance.
[StdSchedulerFactory] Quartz scheduler version: 1.6.0

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