title: Correct way to get beans from applicationContext Spring
body: <p>I have a factory that creates instances:</p>
  
  <pre><code>public class myFactory {
      public static getInstace() {
          switch(someInt) {
              case 1:
                  return new MySpringBean();
              case 2:
                  return new MyOtherSpringBean();
          }
      }
  }
  </code></pre>
  
  <p>I need to return a new instance of the beans that are "managed" by Spring bc they have Transactional business logic methods. I have read in many posts here that I should not use getBean method to get a singleton or a new instance from the applicationContext. But I cannot find the proper way to do it for my case. I have used @Resource and it seems to work but it doesn't support static fields.
  Thanx </p>