users@glassfish.java.net

remote iiop client can t get requests from the remote session bean on

From: <forums_at_java.net>
Date: Wed, 22 Jun 2011 05:16:27 -0500 (CDT)

I have deploy a j2ee project on glassfish 3.1 that deployed on linux Centos
5.6.

I have set the following:

public static InitialContext setProps4Connect() {
       
        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");
       
//         optional.  Defaults to localhost.  Only needed if web
server is running
//         on a different host than the appserver
//        String ORBInitialHost =
System.getProperty("com.sun.aas.jws.iiop.defaultHost");
//        String ORBInitialPort =
System.getProperty("com.sun.aas.jws.iiop.defaultPort");
//        props.setProperty("org.omg.CORBA.ORBInitialHost",
ORBInitialHost);
////         optional.  Defaults to 3700.  Only needed if target
orb port is not 3700.
//        props.setProperty("org.omg.CORBA.ORBInitialPort",
ORBInitialPort);
//
//        props.setProperty("org.omg.CORBA.ORBInitialHost",
"localhost");
//        props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
        props.setProperty("org.omg.CORBA.ORBInitialHost",
"192.168.0.17");
//        props.setProperty("org.omg.CORBA.ORBInitialHost", "www1");
        props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
         try {
            InitialContext ic = new InitialContext(props);
            return ic;
          } catch (Exception re) {
            DialogFinancial("soel.utils.setProps4Connect()
InitialContext. Σφάλμα κατά τον ορισμό των
παραμέτρων!", re.toString(), 2, -1);
            return null;
        }
    }

When I run the remote client I can t get or set to remote ejb session beanI
take an error on osgi. The realy reason is that set null value to primary
key, I dont know why. When I change the

props.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.0.17");

to

props.setProperty("org.omg.CORBA.ORBInitialHost", "www1");

then all working fine. This is strange for me. Now as you understand ιs
difficult for me to change all the host files on all the klients and of
course there is noy the right way. I have search and read thousands pages on
the internet. I have see a similar problem with the /etc/hosts file on the
linux server where deploy the glassfish but the same think. Please note if
the props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost"); then
working when changed with the ip of the local mashine then not working.

any idea?


--
[Message sent by forum member 'gla1971']
View Post: http://forums.java.net/node/814678