title: @Qualifier("unique_name") in spring to identify a bean uniquely in application context not working?
body: <p>I have the following scenario:  </p>
  
  <pre><code>class A  with "bean-a" in wireup.xml  
  
  class B extends A  with "bean-b" in wireup.xml  
  </code></pre>
  
  <p>Since <code>B is also A</code>, which means there are more than one instance of class <strong>A</strong> in application context.  </p>
  
  <p>I want to uniquely identify the singleton instance of class <strong>B</strong>, so I used  </p>
  
  <pre><code>@Qualifier("unique_name") in class B 
  </code></pre>
  
  <p>and  </p>
  
  <pre><code>&lt;qualifier value="unique_name"/&gt;  in "bean-b" of wireup.xml   
  </code></pre>
  
  <p>But the issue is still there, I get message as :  </p>
  
  <pre><code>No unique bean of type [A] is defined: expected single matching bean but found 2: [A, B]  
  </code></pre>
  
  <p>How do I resolve this?  </p>
  
  <p>Thank you</p>