Quartz scheduler configuration in cluster

 
Quartz is a very popular open source scheduler engine. Quartz scheduler stores data related to scheduled jobs in the Liferay database.

In clustered environment there will be chance of starting the scheduler for all the nodes at same time which causes duplicate entries in the portal. We should  execute only once for all the nodes.

Suppose if we have configured 4 nodes, then 4 scheduler will start at same time. But we need execute 1 scheduler for a job.

Hence in a clustered environment, it is possible that multiple nodes start the same job at the same time. This can create havoc. To prevent this situation, we need to configure Quartz for the clustered environment.

Add the following property in the portal-ext.properties

org.quartz.jobStore.isClustered=true

 Drop all the tables starting with QUARTZ_. This step is required if Liferay tables are already created.

We just added a property to let the Quartz scheduler know that we are running multiple instances of the Quartz scheduler connected to a single database.

By enabling this property, the Quartz scheduler will make sure that each job is executed only once.

Comments

  1. Kiến thức bạn share rất thông dụng, cảm ơn bạn đã share.
    Tìm hiểu Blog : Bán đá thạch anh

    ReplyDelete
  2. Bài viết của Bạn rất hữu ích, thank bạn đã share.
    Xem tại website : Đá thạch anh vụn rải bể cá

    ReplyDelete
  3. Bài viết của Admin rất hay, thank bạn đã share.
    Thông tin thêm : Tỳ hưu

    ReplyDelete

Post a Comment

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate