问题
We have an existing application which has set up a CORBA ORB runtime environment as client.
At the moment we don't specify any local interface (IP/Ethernet) to use and the runtime seems to get some default interface on our local machine. The machine used is Oracle with Solaris operating system.
The ORB runtime environment used here is Java 7 JDK built-in ORB.
Is there any way to explicitly indicate that a certain local IP interface should be used via some property to ORB.init(...)
?
回答1:
For Oracle JDKs ORB it is
-Dcom.sun.CORBA.ORBServerPort=10023 -Dcom.sun.CORBA.ORBServerHost=1.2.3.4
on cmdline or
Properties prop = new Properties();
prop.put("com.sun.CORBA.ORBServerPort", "10000");
prop.put("com.sun.CORBA.ORBServerHost", "11.1.1.11");
ORB orb = ORB.init(args, prop);
if used programmatic.
来源:https://stackoverflow.com/questions/12938439/corba-orb-runtime-define-local-ip-interface-usage