title: How do I get a managed bean inside an unmanaged object?
body: <p>I have a Logger Bean that gets injected everywhere I want to log something like this:</p>
  
  <pre><code>@Logger
  Log log;
  </code></pre>
  
  <p>following <a href="http://jgeeks.blogspot.com/2008/10/auto-injection-of-logger-into-spring.html" rel="nofollow">this</a> blog. </p>
  
  <p>Now I want to also be able to use that logger bean in an unmanaged object. How do I make this object aware that there is a managed logger out there to use? </p>
  
  <p>I've read somewhere that using the ApplicationContext is bad practice. But maybe it's the only way? If so, what would be the best way to do this? <a href="http://sujitpal.blogspot.com/2007/03/accessing-spring-beans-from-legacy-code.html" rel="nofollow">This</a> seems like the way to go..?</p>
  
  <p>Thanks!</p>