users@glassfish.java.net

Re: Call a remote EJB from Servlet

From: <glassfish_at_javadesktop.org>
Date: Mon, 19 Nov 2007 01:30:17 PST

I try this 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");
 
props.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.1.15");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
 
ClientiEntityFacade clientiEntityFacade = null;
        try {
            InitialContext ic = new InitialContext(props);
            clientiEntityFacade = (ClientiEntityFacade)ic.lookup(ClientiEntityFacade.class.getName());
        } catch (NamingException ex) {
            ex.printStackTrace();
        }

but I get javax.naming.NameNotFoundException.
[Message sent by forum member 'peppeme' (peppeme)]

http://forums.java.net/jive/thread.jspa?messageID=246031