title: EJB lookup failed
body: <p>Am trying to lookup an EJB and when am doing so, getting error as<br>
  <code>While trying to look up comp/env/ejb/UserImpl in /app/webapp/BSWeb/131433158</code></p>
  
  <p>RestImpl:
  `</p>
  
  <pre><code>@Produces("application/json")
  @Consumes("application/json")
  @Path("UserSession")
  @Stateless 
  public class UserSessionManagerImpl {
  @Context
  HttpServletRequest httpServletRequest;
  @Context
  HttpServletResponse httpServletResponse;
  @POST
  @Path("retrieveUserProfile")
  public RetrieveUserProfile retrieveUserProfile (RetrieveUserProfileRequest request)
  {
  try {
  InitialContext ctx = new InitialContext();
  IUserSessionManagerIntf manager = (IUserSessionManagerIntf) ctx.lookup("java:comp/env/ejb/UserSessionImpl");
  replyVO.retrieveUserProfile();
  } catch (Exception namingException) {
  namingException.printStackTrace();
  }
  </code></pre>
  
  <p>My EJB</p>
  
  <pre><code>@Stateless(name = "UserSessionImpl", mappedName = "ejb/UserSessionImpl")
  @Local
  public class UserSessionImpl implements IUserSessionManagerIntf {
  retrieveUserProfile(){
  ....
  }
  </code></pre>
  
  <p>Can some one help on this. Am using this in a rest implementation. On ejb lookup it fails</p>