Browse Source

Add comment on DisposableBean use in @Configuration

Issue: SPR-7901
pull/7/head
Chris Beams 14 years ago
parent
commit
d2faef44fa
  1. 2
      org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java

2
org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java

@ -163,6 +163,8 @@ class ConfigurationClassEnhancer { @@ -163,6 +163,8 @@ class ConfigurationClassEnhancer {
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
Enhancer.registerStaticCallbacks(obj.getClass(), null);
// does the actual (non-CGLIB) superclass actually implement DisposableBean?
// if so, call its dispose() method. If not, just exit.
if (DisposableBean.class.isAssignableFrom(obj.getClass().getSuperclass())) {
return proxy.invokeSuper(obj, args);
}

Loading…
Cancel
Save