Bug 1059914

Summary: [GSS] (6.2.x) @Schedule EJB Timer not using timezone when calculating next timeout
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: EJBAssignee: Brad Maxwell <bmaxwell>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.2.0CC: bmaxwell, cdewolf, smumford
Target Milestone: CR2   
Target Release: EAP 6.2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, a bug was encountered where, if the @Schedule EJB timer used a timezone that was different to that used by the server, any timer invocations after the initial invocation would not fire correctly. This release addresses this behavior and all timer invocations fire as expected when timezones differ between the server and the @Schedule.
Story Points: ---
Clone Of: 1059911 Environment:
Last Closed: 2014-06-02 12:50:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1059911    
Bug Blocks: 1049365    

Description Brad Maxwell 2014-01-30 23:03:32 UTC
+++ This bug was initially created as a clone of Bug #1059911 +++

With a system running in Central Timezone, if it uses the annotation below specifying the timezone as Eastern timezone, with the hour set to the current hour.
The timer will fire once, and it will calculate the next timeout to be in the next hour CST, where as it should take in consideration the timezone specified on @Schedule which is Eastern. If it did, then the timer should continue to fire every minute.

  @Schedule(persistent = false, timezone = "America/New_York", dayOfMonth = "*", dayOfWeek = "*", month = "*", hour = "22", minute = "*", second = "0", year = "*")

21:53:00,006 INFO [stdout] (EJB default - 1) ScheduleTest: nextTimeout:Wed Jan 29 22:00:00 CST 2014

import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;

@Startup
@Singleton
public class ScheduleTest {
  @Schedule(persistent = false, timezone = "America/New_York", dayOfMonth = "*", dayOfWeek = "*", month = "*", hour = "22", minute = "*", second = "0", year = "*")
  public void helloWorld(Timer time) {
    System.out.println("ScheduleTest: timer:" + time.getClass().getName() + " " + time.getNextTimeout() + " " + time.getInfo());
  }
}

Comment 1 JBoss JIRA Server 2014-02-06 06:46:53 UTC
Brad Maxwell <bmaxwell> updated the status of jira WFLY-2840 to Coding In Progress

Comment 4 Scott Mumford 2014-02-27 05:37:41 UTC
This bug has been marked for inclusion in the 6.2.2 Release Notes.

To meet a PM request to have a draft of the document available for review by 4th March 2014, ECS requires assistance from someone involved with it's resolution.

If someone could review the Doc Text field above and fill out any blanks and/or correct any inaccuracies, a draft can be completed in a timely manner.

Comment 5 Jan Martiska 2014-03-04 13:13:13 UTC
Verified in 6.2.2.CR2.

Comment 6 Scott Mumford 2014-03-21 00:46:20 UTC
Thanks for the draft text Brad.

Doc text rewritten to align more closely with other entries. Marking for inclusion in the final document.