Skip to content

ScheduledAnnotationBeanPostProcessor should fall back to default TaskScheduler by name [SPR-13236] #17827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Jul 15, 2015 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jul 15, 2015

Dave Syer opened SPR-13236 and commented

Spring Integration creates a bean of type TaskScheduler but only if it doesn't find one using a sensible search strategy. The strategy in ScheduledAnnotationBeanPostProcessor is different and not as sensible IMO (it has no fallback to a well-known bean name if there are multiple instances). This can be surprising for users.

See discussion here for background: spring-projects/spring-boot#3508, spring-attic/spring-xd#1747 (comment)


Affects: 4.2 RC2

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

It's not too hard to fall back to a bean named "taskScheduler" in ScheduledAnnotationBeanPostProcessor, so we're doing that as of 4.2 GA now. Give it an early try please...

Note that marking the desired scheduler bean as primary is usually a fine solution to the problem, at least when the user has influence on the affected bean definitions.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Dave Syer commented

That seems to work nicely, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants