java - CORBA:尝试配置和运行 OpenORB 时出现问题

标签 java configuration corba openorb

我正在为 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 无法识别配置变化。

  1. 非常感谢您的帮助
  2. 推荐一个不同的、可能更容易配置的 ORB 也不错

一颗感恩的心!

最佳答案

我想我终于做到了......

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

我已经运行:ins -ORBopenorb.home=%TCOO_HOME%\home (请记住,我已将以下标志添加到 ins.bat:-u -e --debug debug)

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

  1. 默认.xml
  2. OpenORB.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>

关于java - CORBA:尝试配置和运行 OpenORB 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2011829/

相关文章:

java - HttpURLConnection 随机延迟

configuration - tmux:为什么这两行会在启动时导致 ".tmux.conf:2: can' t 建立当前 session ?

java - idl2java 不适用于 64 位 JVM?加载 jre\bin\server\jvm.dll 时出错

c++ - 用于 C++ 的 CORBA IDL 预编译器

c++ - 是否可以传递 long 而不是 CORBA::Long 等?

java - 客户端从服务器请求公共(public)

java - 包含一个字符串的列表是否等于(在内存使用方面)包含一个字符串和一个空对象的列表?

java - 正则表达式 Java 错误

node.js - 如何从 npm 中删除 cli 配置

android - 强制使用不同的语言环境仅适用于返回堆栈中的顶级 Activity