Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-31466

It is possible to add multiple scheduler-entry with the same scheduler-event-listener-class, however it isn't working correctly.



      Let's have more registered scheduler for one portlet for a portlet in a plugin with the same scheduler class (see below).

      1) The entries will be registered separately for the portlet, it's a list object. So theoretically it's possible to have the same scheduler class more times with different triggers. However, the job name and the group name for the trigger will be the SAME scheduler class name for all of the scheduler entries.

      2) During scheduling in the SchedulerEngineUtil class a SchedulerEventMessageListenerWrapper class will be instantiated and registered for all of the scheduler entries and a trigger will be created. It's fine.

      3) The trigger is identified by its group and job name and because of this the last trigger will be applied for all of the scheduler entries (with the same scheduler class).

      There is a workaround with using different scheduler classes, however, the separated scheduler entries should work independently from each other and it's possible to configure multiple scheduler-entry, but it's not working.

       1        <scheduler-entry>
       2            <scheduler-description>
       3                This scheduler is used to run my own job
       4            </scheduler-description>
       5            <scheduler-event-listener-class>com.portlet.test.trigger.MyScheduler</scheduler-event-listener-class>
       6            <trigger>
       7                <cron>
       8                    <cron-trigger-value>0/30 * * * * ?</cron-trigger-value>
       9                </cron>
      10            </trigger>
      11        </scheduler-entry> 
      12        <scheduler-entry>
      13            <scheduler-description>
      14                This scheduler is used to run my own job
      15            </scheduler-description>
      16            <scheduler-event-listener-class>com.portlet.test.trigger.MyScheduler</scheduler-event-listener-class>
      17            <trigger>
      18                <cron>
      19                    <cron-trigger-value>0/45 * * * * ?</cron-trigger-value>
      20                </cron>
      21            </trigger>
      22        </scheduler-entry>


          Issue Links



              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created:
                  Days since last comment:
                  1 year, 43 weeks ago