Skip to content

Not possible to configure TimerManagerFactoryBean for fixed-delay execution with period=0 [SPR-2856] #7543

@spring-projects-issues

Description

@spring-projects-issues

Steven Devijver opened SPR-2856 and commented

It's not possible to configure TimerManagerFactoryBean (through ScheduledTimerListener) for fixed-delay execution with period=0. We use this scenario to immediately reschedule a job once it's finished.

We have to use fixed-delay and not fixed-rate since we only want one job to run at any given time (see http://e-docs.bea.com/wls/docs92/javadocs/commonj/timers/TimerManager.html for details). However, configuring a ScheduledTimerListener with fixedRate=false and period=0 puts us in neither fixed-rate nor fixed-delay but run-once.

The solution to get fixed-delay is to increase the value for period, for example to 1. I think the configuration would make more sense if there would be FixedRateScheduledTimerListener, FixedDelayScheduledTimerListener and RunOnceScheduledTimerListener configuration classes.


Affects: 2.0 final

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions