title: EJB lookup problem
body: <p>I have a Glassfish v2.1.1 cluster setup. I deployed an EAR file consisting a single stateless bean to stand alone server. It has an IIOP port 3752.</p>
  
  <p>My client application which will be communicating with this bean is deployed on cluster. When i lookup bean's name, i get NameNotFoundException. Code looks as below:</p>
  
  <pre><code>Properties props = new Properties();
  
  props.setProperty("java.naming.factory.initial",    "com.sun.enterprise.naming.SerialInitContextFactory");
  
  props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
  
  props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
  
  
  if (logger.isDebugEnabled()) {
  
    logger.debug("Looking for bean from location : " + PropertiesService.instance().getSchedulerOrbHost() + ":"
  
                  + PropertiesService.instance().getSchedulerOrbPort());
  
  }
  
  
  props.setProperty("org.omg.CORBA.ORBInitialHost",     PropertiesService.instance().getSchedulerOrbHost());
  
  props.setProperty("org.omg.CORBA.ORBInitialPort",     PropertiesService.instance().getSchedulerOrbPort());
  
  
  InitialContext context = null;
  
  
  try {
  
  context = new InitialContext(props);
  
  } catch (NamingException e) {
  
  e.printStackTrace();
  
  }
  
  String beanName = "test.OperationControllerRemote";
  
  OperationControllerRemote remote = (OperationControllerRemote) context.lookup(beanName);
  </code></pre>
  
  <p>Note that i checked JNDI tree and name "test.OperationControllerRemote" is there.</p>
  
  <p>Any opinions please?</p>