title: EJB3 beans JNDI lookup in Websphere 7
body: <p>I have created an EAR with a web project, ejb3 project and the ejb client. I'm able to call the bean methods via injection in the servlet.
  I'm planning to use a ServiceDelegate which is a pojo to handle the bean invocation. So I'll call the delegate from my servlet and the delegate will call the appropriate beans and its methods.</p>
  
  <p>But I'm unable to get the bean references in the delegate class which is in the web project. @EJB annotation returned a null reference. So I tried a JNDI lookup with <em>java:comp/env/EARname/BeanName</em>. But I always end up with naming exceptions.</p>
  
  <blockquote>
    <p>Name comp/env/EARname not found in context "java:".</p>
  </blockquote>
  
  <p>Please suggest me the correct way to call ejb3 beans via JNDI on Websphere 7 server.</p>