title: @EJB injection giving null
body: <p>I have a trouble declaring a field as @EJB.</p>
  <p>There is my LocalBean with the @LocalBean annotation</p>
  <pre><code>@LocalBean
  @Stateless
  public class PersonaBean {
  
      @PersistenceContext
      EntityManager em;
      
      public PersonaBean() {
          // TODO Auto-generated constructor stub
      }
  </code></pre>
  <p>There is another bean which uses the PersonaBean, using the @EJB. In this case, the field PersonaDAO isn´t giving null, that´s ok.</p>
  <pre><code>@Stateless
  @LocalBean
  public class GestionPersonaService implements Serializable{
      private static final long serialVersionUID = 1L;
      
      @EJB
      PersonaBean PersonaDAO;
  
      @EJB
      RolBean rolDAO;
      
      PersonaValidation personaValidation;
      /**
       * Default constructor. 
       */
      
      public GestionPersonaService() {
          personaValidation = new PersonaValidation();
      }
  </code></pre>
  <p>But in this class, where I also use the PersonaBean, in the field PersonaDAO, with the @EJB, that´s giving me a nullPointerException in PersonaDAO.</p>
  <pre><code>public class PersonaValidation {
      
      @EJB
      PersonaBean PersonaDAO;
  
      @EJB
      RolBean rolDAO;
      
      public PersonaValidation() {
          super();
      }
      
      public int validate(PersonaDTO personaDTO) throws PersonaException{
          try {
              PersonaTambo persona = PersonaDAO.personaPorNombreUsuario(personaDTO.getNombreUsuario());
              if (persona != null)
                  if (persona.getEstado() == 1) {
                      throw new PersonaException(&quot;P001&quot;, PersonaException.USUARIO_EXISTE);
                  }
                  else
                      return HttpResponseCodes.SC_OK;
          } catch (Exception e) {
              e.printStackTrace();
          }
          return 0;
      }
  </code></pre>