Avoid infinite loop in InterceptMethodsBeanDefinitionDecoratorTests when upgrading to Spring 3.0.1.

Converted test target to implement ApplicationListener<SessionCreatedEvent> so that it doesn't receive events from its own interceptor (which are in turn intercepted).
This commit is contained in:
Luke Taylor 2010-02-16 00:02:03 +00:00
parent bd635edc31
commit 5b5934144a
1 changed files with 3 additions and 3 deletions

View File

@ -1,12 +1,12 @@
package org.springframework.security.config; package org.springframework.security.config;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.security.core.session.SessionCreationEvent;
/** /**
* @author Luke Taylor * @author Luke Taylor
*/ */
public class TestBusinessBeanImpl implements TestBusinessBean, ApplicationListener<ApplicationEvent> { public class TestBusinessBeanImpl implements TestBusinessBean, ApplicationListener<SessionCreationEvent> {
public void setInteger(int i) { public void setInteger(int i) {
} }
@ -27,7 +27,7 @@ public class TestBusinessBeanImpl implements TestBusinessBean, ApplicationListen
public void unprotected() { public void unprotected() {
} }
public void onApplicationEvent(ApplicationEvent event) { public void onApplicationEvent(SessionCreationEvent event) {
System.out.println(event); System.out.println(event);
} }
} }