[jboss-jira] [JBoss JIRA] (AS7-2032) EJB Timer Service - cannot cancel configured calendar timer.
Stuart Douglas (Resolved) (JIRA)
jira-events at lists.jboss.org
Sat Nov 5 03:52:45 EDT 2011
[ https://issues.jboss.org/browse/AS7-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas resolved AS7-2032.
---------------------------------
Fix Version/s: 7.1.0.Beta1
Resolution: Done
> EJB Timer Service - cannot cancel configured calendar timer.
> ------------------------------------------------------------
>
> Key: AS7-2032
> URL: https://issues.jboss.org/browse/AS7-2032
> Project: Application Server 7
> Issue Type: Bug
> Components: EJB
> Affects Versions: 7.0.2.Final
> Environment: Windows 7
> jdk1.6.0_21
> Reporter: Andreas Wuttke
> Assignee: Stuart Douglas
> Fix For: 7.1.0.Beta1
>
>
> // Timer configuration
> private String payload = "This is the payload passed to the timer event";
> ScheduleExpression schedule = new ScheduleExpression().second(30).minute("*").hour("*").dayOfMonth("*").dayOfWeek("*").month("*").year("*");
> private Timer timer = timerService.createCalendarTimer(schedule, new TimerConfig(payload, true));
> ...
> timer.cancel(); // -> doesn't work!
> Collection<Timer> timers = timerService.getTimers();
> System.out.println("Timers configured: " + timers); // still reports the timer
> // Callback configuration
> @SuppressWarnings("unused")
> @Timeout
> private void configurationScheduledTimeout(final Timer t) {
> String info = (String) t.getInfo();
> System.out.println("configurationScheduledTimeout called at: " + new java.util.Date() + "info: " + info);
> }
> Cancel from within configurationScheduledTimeout also didn't work.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list