我正在为 CORBA 客户端编写一个模拟器,也就是说,我正在模拟一个 CORBA 服务器。
CORBA 服务器的一个要求是它向 CORBA NameService 注册某个对象。
我不知何故偶然发现了 OpenORB。
我已经下载了它的所有二进制 zip 存档并将它们全部解压缩到一个目录 - %TCOO_HOME%
。我通过 %TCOO_HOME%\NamingService\bin
目录中的 ins.bat
脚本运行 NameService。
我设法运行名称服务。
如果我编辑 ins.bat
文件并添加到 %JAVA% -Xbootclasspath/p:%BOOTCLASSPATH% -Dopenorb.home.path=%TCOO_HOME% -jar %TCOO_HOME%\tools\lib\launcher.jar org.openorb.ins.Server %*
命令标志:-u -e --debug debug
我什至可以看到以下打印出来的内容:
[main] [DEBUG] (ins.svc): Trying to bind: 'COS/NameService/NamingContextExt' ( NoNS = true )
[main] [INFO ] (ins.svc): NameService=corbaloc:iiop:1.2@localhost:683/NameService
如果我在 %TCOO_HOME%\OpenORB\config
中编辑 default.xml
配置文件,并按以下方式将端口更改为 684:
<profile name="DefaultCorbalocService">
<description>
This profile loads the CorbalocService module, and sets the port
number in iiop to 683, the default port.
</description>
<import module="CorbalocService" />
<import module="iiop" >
<property name="port" value="684" />
</import>
</profile>
ins.bat 文件的输出没有发生任何变化 - 换句话说,ins 无法识别配置变化。
- 非常感谢您的帮助
- 推荐一个不同的、可能更容易配置的 ORB 也不错
一颗感恩的心!
最佳答案
我想我终于做到了......
我只能回答我的第一个问题,不能回答第二个问题。
我已经运行:ins -ORBopenorb.home=%TCOO_HOME%\home
(请记住,我已将以下标志添加到 ins.bat
:-u -e --debug debug
)
我已将以下文件复制到 %TCOO_HOME%\home
:
- 默认.xml
- OpenORB.xml
- orb.properties
- pss.xml
并且输出包含预期的以下内容:
[main] [DEBUG] (ins.svc): Trying to bind: 'COS/NameService/NamingContextExt' ( NoNS = true )
[main] [INFO ] (ins.svc): NameService=corbaloc:iiop:1.2@localhost:684/NameService
编辑:
如果您不想使用 -e 标志,您应该编辑 OpenORB.xml 中的默认配置文件:
<profile name="default" xlink:href="${openorb.home}config/default.xml#default">
<description>
The default profile loads the POA, iiop and some basic initial references.
</description>
<import xlink:href="${openorb.home}config/default.xml#iiop">
<property name="port" value="684"/>
</import>
</profile>
关于java - CORBA:尝试配置和运行 OpenORB 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2011829/