Hello,
I have the following test program, which runs fine to lookup a remote stateless session bean.
But the problem is when my program is running, I restart Geronimo, the JNDI lookup will always fail even after Geronimo is fully restarted.
I am not sure it is a problem of Geronimo or Openejb.
Anyone knows how to solve this or work around it?
Thanks

public class testRemote {
   
    public static void testEjb()throws Exception{
        Properties p = new Properties();
        p.setProperty("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory");
        p.setProperty("java.naming.provider.url", "ejbd://localhost:4201");
        p.setProperty("java.naming.security.principal", "system");
        p.setProperty("java.naming.security.credentials", "manager");
        p.setProperty("openejb.authentication.realmName", "geronimo-admin");
        InitialContext context = new InitialContext(p);

        MyService service = (MyService) context.lookup("MyServiceImplRemote");
        Object o = service.getAllCustomers();
        System.out.println(o);
    }
   
    public static void main(String[] args) throws Exception{
        while (true){
            try{
                testEjb();
               
            }catch(Exception e){
                e.printStackTrace();
            }
            Thread.sleep(5000);
        }
    }