title: Best practice for dynamically removing a Spring ApplicationListener?
body: <p>I would like to register and unregister Spring ApplicationListeners dynamically at run-time and not in a Spring config file.</p>
  
  <p>If I can't remove them dynamically, I'll have a memory leak.</p>
  
  <p>Here's my best guess:</p>
  
  <p>I could call <code>AbstractApplicationContext.getApplicationEventMulticaster().add/removeApplicationListener()</code>.</p>
  
  <p>Is that the recommended method?</p>
  
  <p>Does anyone remove listeners dynamically?</p>