title: JSF managed-bean EJB injection
body: <p>I have an EJB (PersonManager) in the Enterprise Application modul, which injects another EJB (Person):</p>
  
  <pre><code>@Stateful
  public class PersonManager implements PersonManagerLocal {
      @EJB
      private PersonLocal person;
  
      @Override
      public void setPersonName(String name) {
          person.setName(name);
      }
  
      @Override
      public String getPersonName() {
          return person.getName();
      }
  }
  </code></pre>
  
  <p>I want to use the PersonManager EJB in a JSF web app. I define it in the faces-config.xml:</p>
  
  <pre><code>&lt;managed-bean&gt;
      &lt;managed-bean-name&gt;personManager&lt;/managed-bean-name&gt;
      &lt;managed-bean-class&gt;ejb.PersonManager&lt;/managed-bean-class&gt;
      &lt;managed-bean-scope&gt;session&lt;/managed-bean-scope&gt;
  &lt;/managed-bean&gt;
  </code></pre>
  
  <p>The problem is that, the injection of the PersonLocal EJB doesn't happen. The person property is always NULL. What did I wrong?</p>
  
  <p>But if I inject the PersonManager in a JSF managed bean like this:</p>
  
  <pre><code>@ManagedBean
  @RequestScoped
  public class Index {
      @EJB
      private PersonManagerLocal personManager;
      ....
  </code></pre>
  
  <p>IT WORKS. I need the first scenario, please help me :-D</p>