2

我正在为 CORBA 客户端编写一个模拟器,即我正在模拟一个 CORBA 服务器。

CORBA 服务器的一个要求是它向 CORBA NameService 注册某个对象。

我不知何故偶然发现了 OpenORB。

我已经下载了它所有的二进制 zip 档案,并将它们全部解压到一个目录中 - %TCOO_HOME%. ins.bat我通过目录中的脚本运行 NameService %TCOO_HOME%\NamingService\bin

我设法运行 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

如果我编辑default.xml配置文件%TCOO_HOME%\OpenORB\config并以下列方式将端口更改为 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 无法识别配置更改。

  1. 帮助将不胜感激
  2. 推荐一个不同的、可能更容易配置的 ORB 也可能不错

一颗心感到感谢!

4

1 回答 1

2

我想我终于做到了……

我只能回答我的第一个问题,而不能回答第二个问题。

我已经跑了:(ins -ORBopenorb.home=%TCOO_HOME%\home 记得我已经添加了以下标志ins.bat:)-u -e --debug debug

我已将以下文件复制到%TCOO_HOME%\home

  1. 默认.xml
  2. 打开ORB.xml
  3. orb.properties
  4. 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>
于 2010-01-06T13:43:35.090 回答