FAQs

Frequently Asked Questions - quartz-scheduler-mbean-name

FAQs - quartz-scheduler-mbean-name

This happens in clustered Quartz scheduler deployments that are configured to use auto-generated Quartz scheduler instance IDs (org.quartz.scheduler.instanceId=AUTO) and either of the following two conditions holds true:

    1. Quartz is not configured to use any particular instance ID generator class. In this case Quartz uses the default instance ID generator class org.quartz.simpl.SimpleInstanceIdGenerator.
    2. Quartz is explicitely configured to use the org.quartz.simpl.SimpleInstanceIdGenerator instance ID generator class.

org.quartz.simpl.SimpleInstanceIdGenerator class produces random instance IDs upon every Quartz scheduler restart. Unless you have configured Quartz to use an explicit JMX export name for its MBean using the org.quartz.scheduler.jmx.objectName configuration property, Quartz embeds the generated instance ID into the JMX scheduler object name. QuartzDesk platform uses the JMX scheduler object name as a Quartz scheduler ID and requires this object name to be constant.

Please avoid using the org.quartz.simpl.SimpleInstanceIdGenerator class and instead use one of the following implementations available in the Quartz scheduler distribution. The instance ID generator class to be used by Quartz can be set using the org.quartz.scheduler.instanceIdGenerator.class Quartz configuration property.

ImplementationDescription
org.quartz.simpl.HostnameInstanceIdGeneratorReturns the hostname as the instance ID.
org.quartz.simpl.SystemPropertyInstanceIdGeneratorReturns the value of the org.quartz.scheduler.instanceId system property. Available with Quartz 2.0 or higher.


If none of the above implementations suits your needs, you can implement your own InstanceIdGenerator implementation that can, for example, read the scheduler ID from the application configuration file.