title: Java EE, injecting one EJB into another EJB
body: <p>I've encountered one issue I can't seem to figure out. I would like to inject one EJB into another like this:</p>
  
  <pre><code>@Stateless
  public class MainEJB {
  
      @EJB
      private HelperEJB helper;
  
  }
  
  @Stateless
  public class HelperEJB implements HelperInterface {
  
  }
  </code></pre>
  
  <p>As you can see, HelperEJB is exposed through a no-interface view (note: <code>HelperInterface</code> is an interface from an external library, it is not an EJB interface). This does not work, and I will get the following exception:</p>
  
  <pre><code> javax.naming.NamingException: Lookup failed for 'org.mycompany.ejb.HelperEJB #org.mycompany.ejb.HelperEJB'
  </code></pre>
  
  <p>However, if <code>HelperEJB</code> does not implement any interface:</p>
  
  <pre><code>@Stateless
  public class HelperEJB {
  
  }
  </code></pre>
  
  <p>It will work. It will also work if I have a <code>@Local</code> interface standing between MainEJB and HelperEJB.</p>
  
  <p>Why this cannot be done through a no-interface view like in my first attempt?</p>