title: Java EE 6 @javax.annotation.ManagedBean vs. @javax.inject.Named vs. @javax.faces.ManagedBean
body: <p>I feel there is a little mess in the Java EE 6 spec. There are several sets of annotations.</p>
  
  <p>We have <code>javax.ejb</code> annotations like <code>@Stateful</code> and <code>@Stateless</code> for creating EJBs.</p>
  
  <p>There is also a <code>@javax.annotation.ManagedBean</code> to create a managed bean.</p>
  
  <p>There are annotations in <code>javax.enterprise.context</code> like <code>@SessionScoped</code> and <code>@RequestScoped</code>. </p>
  
  <p>What is more there are also <code>@ManagedBean</code> and <code>@SessionScoped</code>/<code>@RequestScoped</code> annotations in <code>javax.faces.bean</code> package.</p>
  
  <p>And to make things event more complicated there is a package <code>javax.inject</code> with <code>@Named</code> annotation.</p>
  
  <p>Can someone please describe how they are related one to another? </p>
  
  <p>Where can I use <code>@EJB</code>, <code>@Inject</code> or <code>@ManagedPropery</code> to inject other beans?</p>