Skip to content
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

Support @Order on ApplicationListeners [SPR-12410] #17018

Closed
spring-issuemaster opened this issue Nov 3, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Nov 3, 2014

Sam Brannen opened SPR-12410 and commented

Status Quo

AbstractApplicationEventMulticaster currently sorts ApplicationListener instances based on the Ordered interface, but the sorting algorithm does not honor annotations.

At the time of this writing, there are two invocations of OrderComparator.sort() within AbstractApplicationEventMulticaster.

Proposal

Refactor AbstractApplicationEventMulticaster to use AnnotationAwareOrderComparator.sort() instead of OrderComparator.sort().


Affects: 3.0 GA

Issue Links:

  • #14690 AbstractApplicationEventMulticaster does not sort listeners using @Order ("is duplicated by")
  • #16245 ApplicationListener-like annotation for consuming application events
  • #17403 @Order annotations not consistently honored within DispatcherServlet and other parts of the framework

Referenced from: commits 8eb7bee

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 16, 2015

Stéphane Nicoll commented

ApplicationListener implementations can now be ordered either using @Order or by implementing the Ordered interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.