users@glassfish.java.net

EJB Standalone client seems to ignore host property?

From: Thorsten Jungblut <ulli_at_netcorner.org>
Date: Mon, 11 Jun 2007 16:16:40 +0200 (CEST)

Hi

i got a simple EJB standalone client using appserv-rt.jar:

public class RemoteClient {
    public static void main(String[] args) throws Exception {
        System.out.println("LAUNCHED!");
        
        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",
"devx.red-web.org");
        props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
        
        InitialContext ic = new InitialContext(props);
        
        Authentication auth = (Authentication)
ic.lookup("eu.red_web.authentication.beans.Authentication");
    }
}

Now the problem is, that it seems to ignore the host i set:


11.06.2007 15:51:06
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNUNG: "IOP00410201: (COMM_FAILURE) Connection failure: socketType:
IIOP_CLEAR_TEXT; hostname: 127.0.0.1; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
...
Caused by: java.net.ConnectException: Connection refused


Connecting my host devx.red-web.org on port 3700 is no problem.

Now the strange thing:

If i change the port to 3701, it seems to no longer ignore my host:


11.06.2007 15:55:22
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNUNG: "IOP00410201: (COMM_FAILURE) Connection failure: socketType:
IIOP_CLEAR_TEXT; hostname: devx.red-web.org; port: 3701"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No


Is that a bug?

If i forward port 3700 from localhost to devx.red-web.org, everything is
fine.

Best regards
T. Jungblut