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

Andreas Wuttke (Commented) (JIRA) jira-events at lists.jboss.org
Thu Oct 6 11:35:16 EDT 2011


    [ https://issues.jboss.org/browse/AS7-2032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632822#comment-12632822 ] 

Andreas Wuttke commented on AS7-2032:
-------------------------------------

EJB configuration in standalone.xml:

<subsystem xmlns="urn:jboss:domain:ejb3:1.1">
   <timer-service>
      <thread-pool core-threads="1" max-threads="4"/>
      <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
   </timer-service>
</subsystem>

lite="true" had to be removed from ejb3 subsystem configuration in order to get the timer service up and running.

                
> 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: Carlo de Wolf
>
> // 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