title: Registering a shutdown hook in Spring 2.5
body: <p>I have a spring application which is not calling bean destroy methods on shutdown. I've seen references to this being due to instantiation in a beanRefFactory, and that this can be circumvented through manually calling registerShutdownHook() on an the application context.This method seems to have disappeared from spring between versions 2.0 - 2.5. </p>
  
  <p>Can someone point me in the direction of how this is now done?</p>
  
  <p>Thanks.</p>