fixed ApplicationContext event processing for repeated invocations to non-singleton listener beans (SPR-7563)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3705 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2010-10-01 22:16:21 +00:00
parent a2aea5054d
commit f3e7fd9bc9
2 changed files with 45 additions and 2 deletions
@@ -238,7 +238,7 @@ public abstract class AbstractApplicationEventMulticaster implements Application
BeanFactory beanFactory = getBeanFactory();
for (String listenerBeanName : this.applicationListenerBeans) {
ApplicationListener listener = beanFactory.getBean(listenerBeanName, ApplicationListener.class);
if (!this.preFiltered && !allListeners.contains(listener)) {
if (this.preFiltered || !allListeners.contains(listener)) {
allListeners.add(listener);
}
}