Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15922

TimerServiceImpl should clone the ScheduleExpression from the user input

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 27.0.0.Alpha1, 27.0.0.Final
    • 27.0.0.Alpha1
    • EJB
    • None

    Description

      ScheduleExpression can be modified after being submitted to timer service to create a calendar timer. So ejb3 timer service should clone the schedule expression from the user input. We should only clone it when necessary, i.e., only when user invokes the timer service create methods to create calendar timer, not for internally created calendar timer.

      The tck test failure:

              [TEST FAILED] testName=allTZ Failed with EJBException caused by 
      java.lang.RuntimeException: Check TZ in schedule: year=5000 month=* dayOfMonth=* dayOfWeek=* hour=0 minute=0 second=0 start=null end=null timezone=Africa/Harare

        Expecting EUROPE/ANDORRA, but actual AFRICA/HARARE
          at com.sun.ts.tests.ejb30.common.helper.Helper.assertEquals(Helper.java:89)
          at com.sun.ts.tests.ejb32.lite.timer.schedule.tz.TZScheduleBareBean.verifyTZ(TZScheduleBareBean.java:112)
          at com.sun.ts.tests.ejb32.lite.timer.schedule.tz.TZScheduleBareBean.allTZ(TZScheduleBareBean.java:85)

       

      It was caused by recent 2 refactoring fixes, combined:

      WFLY-15792 Simplify getTimeZone in CalendarBasedTimeout and remove redundant null checks
      WFLY-15791 Simplify CalendarTimer.Builder by using ScheduleExpression instead of individual schedule attributes

      Attachments

        Issue Links

          Activity

            People

              cfang@redhat.com Cheng Fang
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: