[jboss-jira] [JBoss JIRA] (AS7-2032) EJB Timer Service - cannot cancel configured calendar timer.

Stuart Douglas (Assigned) (JIRA) jira-events at lists.jboss.org
Fri Oct 7 01:32:16 EDT 2011


     [ https://issues.jboss.org/browse/AS7-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas reassigned AS7-2032:
-----------------------------------

    Assignee: Stuart Douglas  (was: Carlo de Wolf)

    
> 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
>
> // 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