ConfigurableListableBeanFactory factory = new XmlBeanFactory(
new FileSystemResource(
"./ch5/src/conf/interaction/shutdownHook.xml"));
// make sure the shutdown hook is created
factory.preInstantiateSingletons();
DestructiveBeanWithInterface bean = (DestructiveBeanWithInterface) factory.getBean("destructiveBean");
}
}