Accessing an EJB deployed on websphere community server using Open EJB?
        Posted  
        
            by Jared
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jared
        
        
        
        Published on 2010-05-04T14:55:28Z
        Indexed on 
            2010/05/04
            14:58 UTC
        
        
        Read the original article
        Hit count: 296
        
How can I access an EJB deployed on websphere community server using Open EJB? I'm trying to use code like the following but am not sure what to use for a URL. Note I've tried port 2809 and 1099 with ejb: and IIOP URL prefixes.
            Properties props = new Properties();
            props.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.RemoteInitialContextFactory");
            props.put(Context.PROVIDER_URL,"IIOP://127.0.0.1:2809");
            Context ctx = new InitialContext(props);
            Object ref = ctx.lookup("CalculatorRemote  ");
CalculatorImpl h = (CalculatorImpl )PortableRemoteObject.narrow(ref,CalculatorImpl.class);
© Stack Overflow or respective owner