Restore BeanFactory.