AnsweredAssumed Answered

Cron task getting triggered from multiple nodes in Jive cluster

Question asked by ranadeep on Jun 26, 2014

Hi Team,

 

We are experiencing a weird behaviour of the Jive's cron task API where the cron job is getting executed in parallel on all 4 APP nodes. Is the API suppose to ensure execution of the cron on only that APP node which picks the object lock of the Java class whose method is called. Currently the method in the Java class is getting invoked from all 4 APP nodes. The following are the current cron task configurations used in our plugin.

 

<bean id="feedSyncCronTaskList" class="com.jivesoftware.community.util.spring.MergeableCollection" parent="tasks">

     <property name="source">

          <util:list value-type="com.jivesoftware.community.lifecycle.spring.task.TaskDefinitionBean">

               <ref bean="feedSyncCronTask" />

          </util:list>

     </property>

</bean>

       

<bean id="feedSyncCronTask" class="com.jivesoftware.community.lifecycle.spring.task.CronTaskDefinitionBean">

     <property name="task" ref="cronInputFeedProcessor" />

     <property name="cronExpression" value="${hrms.cron.timing.expression}" />

</bean>

   

<bean id="cronInputFeedProcessor" class="com.abc.task.CronInputFeedProcessor">

     <property name="inputFeedProcessor" ref="inputFeedProcessor"/>

</bean>

 

<bean id="inputFeedProcessor" class="com.abc.bo.InputFeedProcessor"/>

 

CronInputFeedProcessor implements Runnable and calls the business logic residing in another class - InputFeedProcessor, inside a method. In short, this business logic is observed to be called from multiple nodes at the same time.

 

Are we missing anything in our bean configuration or, any other setting elsewhere ?

 

Regards,

Ranadeep.

Outcomes