Java 的 CORBA ORB 并连接到第 3 方命名服务
以下内容来自 JavaTM IDL 常见问题解答:
如何从 Sun 的 ORB 连接到第 3 方命名服务?
推荐的方法是使用
, 如果此选项受支持 第三方命名服务。
将 Sun ORB 与另一个一起使用 供应商的命名服务,
- 在主机和端口上启动第 3 方名称服务器。
将以下参数传递给 ORB.init():
-ORBInitRef NameService=corbaloc:iiop:1.2@:/NameService
当你执行 orb.resolve_initial_references( “NameService”),您应该能够 连接到第 3 方名称服务。如果 您仍然无法连接,请尝试 这些故障排除提示:
验证第 3 方名称服务是否支持 INS。
验证主机和端口信息是否准确。
验证第 3 方名称服务是否已成功启动。
验证第 3 方名称服务是否支持 GIOP 1.2。如果不, 参考名称服务器的 正确的 GIOP 的文档 版本,并修改 corbaloc: URL 相应地。
确定第 3 方名称服务是否具有不同的对象密钥 用于联系NameService。如果是这样, 参考名称服务器的 文档。
我是 CORBA 新手,我想知道是否有其他方法可以连接到第三方命名服务,但可能不那么“推荐”。毕竟,我如何猜测(目前尚不清楚)第 3 方命名服务是否支持 INS(可互操作命名服务)。但话又说回来,我确实提到我对这些事情很陌生......
The Following is from 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.
I am new to CORBA and I would like to know whether or not there is another way to connect to a 3rd party Naming Service which might not be so "recommended". After all how am I to guess if, as yet unknown, 3rd party naming service supports INS (Interoperable Naming Service). But then again, I did mention that I am new to these things...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自从 CORBA 上次对我造成影响以来,已经过去 10 多年了,但我仍然记得一些事情。
“不推荐”的方法是使用 IOR(可互操作命名参考),它相当于 CORBA 的 URL。 IOR 本质上是活动 CORBA 对象位置的字符串表示形式。客户端可以将 IOR 转换为该对象的句柄。
通常,IOR 本身指向 CoS 命名服务,它是其他对象的注册表,但希望拥有直接指向远程对象的 IOR 也是有效的。
请参阅这篇古老文章(来自 1999 年,上次有人关心 CORBA)来了解如何处理 IOR。
It's been more than 10 happy years since CORBA was last inflicted on me, but I still remember a few things.
The "not recommended" way is to use a IOR (Interoperable Naming Reference), which is CORBA's equivalent of a URL. The IOR is essentially a string representation of the location of a live CORBA object. A client can convert the IOR into a handle on that object.
Normally, the IOR itself points to a CoS Naming Service, which is a registry of other objects, but it's lust as valid to have an IOR that points directly at a remote object.
See this ancient article (from 1999, the last time anyone cared about CORBA) to see how to deal with IORs.