title: EJB with JNDI not listed in the glassfish JNDI list
body: <p>I have made an EJB with JNDI, using the annotations.<br>
  I made a jar of that EJB code and deployed it in the GlassFish server (version 3).<br>
  I am able to get the object of the EJB in a remote client application, using the JNDI lookup.<br>
  But I am not able to get the EJB name or the <code>mappedName</code> in the GlassFish JNDI list.<br>
  I use the command <code>asadmin list-jndi-entries</code> to get the list of JNDI entries.</p>
  
  <pre><code>@Remote
  public interface TestEjbJndi {
      public Object test();
  }
  </code></pre>
  
  <hr>
  
  <pre><code>@Stateless(name="TestSdkInterface", mappedName="/test/ejb/jndi")
  public class TestEjbJndiImpl implements TestEjbJndi{    
      @Override
      public Object test(){
          System.out.println("Inside getProtocolData");
          return null;
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class RemoteClient {
      public static void main(String[] args) {
          try {
              Context ctx = new InitialContext(); 
              lookup(ctx);
          } catch (NamingException ne) {
              ne.printStackTrace();
          }
      }
  
      private static void lookup(Context ctx) throws NamingException {
          System.out.println("Inside lookup");
          try{
              Object object = ctx.lookup("/test/ejb/jndi");
              System.out.println("lookup done, object :"+object);
  
              TestEjbJndiImpl teji= (TestEjbJndiImpl)object;
              teji.test();
          }catch(NamingException ne){
              ne.printStackTrace();
          }
      }
  }
  </code></pre>