简体   繁体   English

一台具有两个不同JVM的机器上的Quartz?

[英]Quartz on one machine with two different JVMs?

I want to configure Quartz so that It can be run on two different JVMs on the same machine. 我想配置Quartz,以便它可以在同一台机器上的两个不同的JVM上运行。

Anyone has ideas how to do that ? 任何人都有想法该怎么做?

You can do that. 你可以做到的。 I can even recommend running several Quartz instances in their own JVM on one machine. 我什至建议在一台机器上在自己的JVM中运行多个Quartz实例。 If you use different table prefixes in each you get performance improvement because the database locks are independent. 如果在每个表前缀中使用不同的表前缀,则由于数据库锁是独立的,因此可以提高性能。 You have to create the Quartz tables with each of the prefixes. 您必须使用每个前缀创建Quartz表。

org.quartz.jobStore.tablePrefix=qrtz_

Or you can use different instance names if you do not care about Quartz performance: 或者,如果您不关心Quartz的性能,则可以使用其他实例名称:

org.quartz.scheduler.instanceName=JVM1

In this case, you just use the tables with the "quartz_" prefix like you would with one Quartz JVM. 在这种情况下,您只需要使用带有“ quartz_”前缀的表,就像使用一个Quartz JVM一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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