Quartz 2.2 multi scheduler and @DisallowConcurrentExecution
<p>Please consider this example.</p>

<p>A sample web application calls <code>scheduler.start()</code> on its start up. The scheduler configured to store its jobs in DB.</p>

<p>The application is copied on six web-servers. </p>

<p>So if we start six web-servers we will have six scheduler with same name on a single DB. As mentioned in <a href="https://quartz-scheduler.org/documentation/quartz-2.1.x/cookbook/MultipleSchedulers" rel="nofollow">https://quartz-scheduler.org/documentation/quartz-2.1.x/cookbook/MultipleSchedulers</a>:</p>

<blockquote>
  <p>Never start (scheduler.start()) a non-clustered instance against the same set of database tables that any other instance with the same scheduler name is running (start()ed) against. You may get serious data corruption, and will definitely experience erratic behavior. </p>
</blockquote>

<p>So this will fail.</p>

<p>My question is that if I am sure that all of my jobs have <code>@DisallowConcurrentExecution</code> will above work or it will still fail ?!</p>

<hr>

<p>If <code>@DisallowConcurrentExecution</code> does not help, I should do it manually configure one server as some how Master </p>

<pre><code>public class StartUp implements ServletContextListener {

   public void contextInitialized(ServletContextEvent event) {
       if(THIS_IS_MASTER_TOMCAT){
         scheduler.start()
       }
}
</code></pre>

<p>Are there better ways?!</p>