JBoss Community

Re: Does jBPM support clustering for load balancing?

created by Marian Buzdugan in jBPM - View the full discussion

Hello Maciej

 

The TaskService schedules deadline tasks (code below) and it does that in the constructor.

 

.....................................................................................................................................

        for (Object object : em.createNamedQuery("UnescalatedDeadlines").getResultList()) {

            DeadlineSummary summary = (DeadlineSummary) object;

            schedule(new ScheduledTaskDeadline(summary.getTaskId(),

                    summary.getDeadlineId(),

                    this),

                    summary.getDate().getTime() - now);

        }

.....................................................................................................................................

 

If the TaskService is created in each node (server) in the cluster, duplicated deadlines tasks will be created.

How can this be avoided?

 

Thanks

Regards

Marian B

Reply to this message by going to Community

Start a new discussion in jBPM at Community