title: What is javax.inject.Named annotation supposed to be used for?
body: <p>I am trying to understand the <code>javax.inject</code> package and I am not clear what the <code>javax.inject.Named</code> annotation is supposed to be used for. The Javadoc does not explain the the idea behind it. </p>
  
  <p>Javadoc is at <a href="http://download.oracle.com/javaee/6/api/javax/inject/Named.html" rel="noreferrer">http://download.oracle.com/javaee/6/api/javax/inject/Named.html</a></p>
  
  <p>I am using <strong>Spring 3.0</strong> to write some sample programs, by putting <code>@Named</code> on a bean it seems to add it to the bean factory but the Javadoc description is so light I can't tell if that is the standard behavior or Spring specific behavior.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>What is the difference between <code>@Named</code> and <code>@Qualifier</code></li>
  <li>How are you supposed to tell the Runtime system a class should be injectable in other classes what's the annotation for that? The equivalent of <code>@Component</code> in Spring?</li>
  </ol>
  
  <p><strong>Update 1</strong> there is an excellent explanation of <code>@Named</code> and <code>@Qualifier</code> at Nice article about <code>@Named</code> and <code>@Qualifier</code> <a href="https://dzone.com/articles/java-ee6-cdi-named-components" rel="noreferrer">https://dzone.com/articles/java-ee6-cdi-named-components</a> thanks @xmedeko for linking to it the comment below.</p>