CORBA - JacORB: Use fixed port generating IOR?

懵懂的女人 提交于 2019-12-22 11:24:19

问题


How do I make sure JacORB uses a fixed port, lets say 6001, when I use the ORB.object_to_string method?

I tried a few things in the JacORB config, but every generated IOR was a random port.


回答1:


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

That did it for me :)




回答2:


JacORB knows the property OAIAddr

How can I make the server use a specific port number or IP address (in case of multi-homed hosts)?

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.


来源:https://stackoverflow.com/questions/3726817/corba-jacorb-use-fixed-port-generating-ior

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!