title: @PreDestroy method of a Spring singleton bean not called
body: <p>I have a Spring bean defined in <code>beans.xml</code> as follows:</p>
  
  <pre><code>&lt;context:annotation-config /&gt;
  [...]
  &lt;bean id="myBackend" class="mycompany.BackendBean" scope="singleton" /&gt;
  </code></pre>
  
  <p>Inside the bean are 2 methods, which must be executed at the start and before termination of the web application:</p>
  
  <pre><code>public class BackendBean implements IBackend {
      private static final Logger LOGGER = LoggerFactory
              .getLogger(BackendBean.class);
  
      @PostConstruct
      public void init()
      {
          LOGGER.debug("init");
      }
  
      @PreDestroy
      public void destroy()
      {
          LOGGER.debug("destroy");
      }
  }
  </code></pre>
  
  <p>When I run the server (<code>mvn jetty:run</code>), I can see the output of the <code>init</code> method in the console, from which I conclude that the <code>init</code> method is executed.</p>
  
  <p>When I press <code>Ctrl-C</code> and Jetty starts to shut down, I don't see the output of the <code>destroy</code> method.</p>
  
  <p>What should I change in order for the <code>destroy</code> method to be executed, when the application is terminated?</p>