gpt4 book ai didi

Java 的 CORBA ORB 并连接到第 3 方命名服务

转载 作者:行者123 更新时间:2023-11-30 05:14:46 25 4
gpt4 key购买 nike

以下内容来自JavaTM IDL FAQ :

How do I connect to a 3rd-party Naming Service from Sun's ORB?

The recommended way is to use the

Interoperable Naming Service (INS)

, if this option is supported by the 3rd-party Naming Service.

To use the Sun ORB with another vendor's Naming Service,

  • Start the 3rd-party name server on Host and Port.
  • Pass the following argument to ORB.init():

    -ORBInitRef NameService=corbaloc:iiop:1.2@:/NameService

    When you do orb.resolve_initial_references( "NameService" ), you should be able to connect to 3rd-party Name Service. If you are still not able to connect, try these troubleshooting hints:

  • Verify that the 3rd-party Name Service supports INS.

  • Verify that the host and port information is accurate.

  • Verify that the 3rd-party Name Service has been started successfully.

  • Verify that the 3rd-party Name Service supports GIOP 1.2. If not, refer to the Name Server's documentation for the correct the GIOP version, and modify the corbaloc: URL accordingly.

  • Determine if the 3rd-party Name Service has a different object key it uses to contact NameService. If so, refer to the Name Server's documentation.

我是 CORBA 新手,我想知道是否有其他方法可以连接到第三方命名服务,但可能不那么“推荐”。毕竟,我如何猜测(目前尚不清楚)第 3 方命名服务是否支持 INS(可互操作命名服务)。但话又说回来,我确实提到我对这些事情很陌生......

最佳答案

自从 CORBA 上次对我造成影响以来,已经过去 10 多年了,但我仍然记得一些事情。

“不推荐”的方法是使用 IOR(可互操作命名引用),它相当于 CORBA 的 URL。 IOR 本质上是 Activity CORBA 对象位置的字符串表示形式。客户端可以将 IOR 转换为该对象的句柄。

通常,IOR 本身指向 CoS 命名服务,它是其他对象的注册表,但希望拥有直接指向远程对象的 IOR 也是有效的。

查看此ancient article (从 1999 年开始,最后一次有人关心 CORBA)了解如何处理 IOR。

关于Java 的 CORBA ORB 并连接到第 3 方命名服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1981313/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com