CORBA - JacORB:使用固定端口生成IOR?

时间:2010-09-16 12:50:10

标签: java corba

如何确保JacORB使用固定端口, 比方说6001, 当我使用ORB.object_to_string方法?

我在JacORB配置中尝试了一些东西,但每个生成的IOR都是一个随机端口。

2 个答案:

答案 0 :(得分:4)

jacorb.net.server_socket_factory = org.jacorb.orb.factory.PortRangeServerSocketFactory

jacorb.net.server_socket_factory.port.min = 52677

jacorb.net.server_socket_factory.port.max = 52679

这对我来说是这样的:)

答案 1 :(得分:1)

JacORB知道财产OAIAddr

如何让服务器使用特定的端口号或IP地址(如果是多宿主主机)?

JacORB provides two properties that can be set to select a port number and IP address
for servers to listen on.  These properties are OAPort and OAIAddr. Thy can be set on
the commandline using the -D switch to the Java interpreter, in the properties file, or
in the source code of the server. In this last case, they are passed as arguments to
the ORB.init() call.