title: Get new instance of a spring bean
body: <p>I have an interface called <code>MyInterface</code>. The class that implements <code>MyInterface</code> (lets call it <code>MyImplClass</code>) also implements the <code>Runnable</code> interface so i can use it to instantiate threads. This is my code now.</p>
  
  <pre><code>for (OtherClass obj : someList) {
      MyInterface myInter = new MyImplClass(obj);
      Thread t = new Thread(myInter);
      t.start();
  } 
  </code></pre>
  
  <p>What i want to do is to declare the implementing class in my ApplicationContext.xml and get a new instance for each iteration. So my code will look something like this:</p>
  
  <pre><code>for (OtherClass obj : someList) {
      MyInterface myInter = // getting the implementation from elsewhere
      Thread t = new Thread(myInter);
      t.start();
  } 
  </code></pre>
  
  <p>I want to still keep the IoC pattern if possible. <br/> 
  How can i do so? <br/>
  Thanks</p>