From b4442205641365292f55ca0f6091df0d5d2a491f Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Fri, 27 Nov 2009 17:30:35 +0000 Subject: [PATCH] SPR-5507 When determining start/stop order, the DefaultLifecycleProcessor checks for the new Phased interface rather than SmartLifecycle now. --- .../context/support/DefaultLifecycleProcessor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java b/org.springframework.context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java index 3d74ea11f9a..d67869d981c 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java @@ -33,6 +33,7 @@ import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.Lifecycle; import org.springframework.context.LifecycleProcessor; +import org.springframework.context.Phased; import org.springframework.context.SmartLifecycle; import org.springframework.util.Assert; @@ -220,8 +221,8 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor } private static int getPhase(Lifecycle bean) { - return (bean instanceof SmartLifecycle) ? - ((SmartLifecycle) bean).getPhase() : 0; + return (bean instanceof Phased) ? + ((Phased) bean).getPhase() : 0; }