Properties aProperties = new Properties();
aProperties.put("org.omg.CORBA.ORBInitialHost", "localhost");
aProperties.put("org.omg.CORBA.ORBInitialPort", "2930");
ORB orb = ORB.init((String[]) null, aProperties);
//Get the stringified reference over TCP (String ior)
org.omg.CORBA.Object cmdObject = orb.string_to_object(ior);
this.corba = OGE_CMDHelper.narrow(cmdObject);
org.omg.CORBA.ORBInitialHost
和 org.omg.CORBA.ORBInitialPort
究竟代表什么?是CORBA命令的接收端点的主机名和地址(实现对象的位置)?或者是将 CORBA 消息传输到接收方的本地 CORBA ORB 的主机名和端口?还是完全不同?
最佳答案
关于 the Java SE documentation (插入新链接)
org.omg.CORBA.ORBInitialHost
是
运行提供初始引导服务(例如名称服务)的服务器或守护进程的机器的主机名。对于应用程序,此属性的默认值为 localhost。对于小程序,它是小程序宿主,相当于 getCodeBase().getHost()。
org.omg.CORBA.ORBInitialPort
是
初始命名服务监听的端口。默认值为 900。
关于java - 在 Java 中初始化 CORBA ORB 时,ORBInitialHost 和 ORBInitialPort 属性代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8415776/