当您在 Java 中初始化 CORBA ORB 时,ORBInitialHost 和 ORBInitialPort 属性代表什么?

发布于 2024-12-19 21:36:22 字数 582 浏览 4 评论 0原文

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.ORBInitialHostorg.omg.CORBA.ORBInitialPort 到底代表什么?是 CORBA 命令接收端点的主机名和地址(实现对象的位置)吗?或者是将 CORBA 消息传输到接收方的本地 CORBA ORB 的主机名和端口?或者完全是另外一回事?

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);

What exactly do org.omg.CORBA.ORBInitialHost and org.omg.CORBA.ORBInitialPort represent? Is is it the hostname and address of the receiving endpoint of CORBA commands (the location of the implemented objects)? Or is it the hostname and port of the local CORBA ORB that is transmitting CORBA messages to the receiver? Or is it something else entirely?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若无相欠,怎会相见 2024-12-26 21:36:22

关于Java SE 文档(插入新链接)

org.omg.CORBA.ORBInitialHost

运行提供初始引导服务(例如名称服务)的服务器或守护程序的计算机的主机名。对于应用程序,此属性的默认值为 localhost。对于小程序来说,它是小程序主机,相当于 getCodeBase().getHost()。

org.omg.CORBA.ORBInitialPort

初始命名服务侦听的端口。默认值为 900。

Regarding the Java SE documentation (new link inserted)

org.omg.CORBA.ORBInitialHost is

The host name of a machine running a server or daemon that provides initial bootstrap services, such as a name service. The default value for this property is localhost for applications. For applets it is the applet host, equivalent to getCodeBase().getHost().

org.omg.CORBA.ORBInitialPort is

The port the initial naming service listens to. The default value is 900.

意中人 2024-12-26 21:36:22

不管你相信与否,它们代表您的客户端 ORB 将尝试联系的命名服务的主机/端口对(命名服务基本上是 CORBA 对象引用的电话簿)。您可以使用在此图中查看它们的运行情况。

奇怪的是,这些属性从未被 OMG 标准化,但出于某种原因,Sun ORB 将它们打包在 org.omg.CORBA 中,并使其看起来像是标准化的(请参阅底部的小花絮)的 此 IBM 页面)。如果您真的有兴趣阅读旧的 CORBA 历史,这个 OMG 问题 对此进行了一些讨论少量。

引导客户端查找命名服务问题的标准化方法在 CORBA 可互操作命名服务 (INS) 规范,如果可以的话,您应该在这里使用它。

Believe it or not, they represent the host/port pair for the Naming Service that your client ORB will try to contact (the Naming Service is basically a telephone book for CORBA object references). You can see them in action with it in this diagram.

Oddly enough, these properties were never standardized by the OMG, but for some reason the Sun ORB packaged them within org.omg.CORBA and made it look like they were standardized (see the little tidbit at the bottom of this IBM page). If you're really interested in reading old CORBA history, this OMG issue discusses them a little bit.

The standardized approach to the problem of bootstrapping your client to find the Naming Service was defined in the CORBA Interoperable Naming Service (INS) spec, and it's what you should use here if you can.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文