Browse Source

Some polishing

pull/6/head
Christian Dupuis 11 years ago
parent
commit
3f96f3ae61
  1. 8
      spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/hystrix/HystrixConfiguration.java

8
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/hystrix/HystrixConfiguration.java

@ -22,6 +22,7 @@ import java.util.HashSet; @@ -22,6 +22,7 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.catalina.core.ApplicationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.DisposableBean;
@ -193,12 +194,17 @@ public class HystrixConfiguration implements ImportAware { @@ -193,12 +194,17 @@ public class HystrixConfiguration implements ImportAware {
}
/**
* {@link DisposableBean} that makes sure that Hystrix internal state is cleared
* when {@link ApplicationContext} shuts down.
*/
private class HystrixShutdownHook implements DisposableBean {
@Override
public void destroy() throws Exception {
// Just call Hystrix to reset thread pool etc.
Hystrix.reset();
}
}
}

Loading…
Cancel
Save