Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CORBA client with multiple network interfaces - bind to specific network interface

Tags:

java

corba

orb

I have develop java (jdk5) corba client to receive NotificationIRP proactive events from server. My below code is working fine with single network card. if client system have multiple network interfaces, call back always selecting wrong network card and failed to connect to client. I have tried by specifying -ORBEndpoint argument in orb. But still no success.

String[] args = new String[2];

args[0]="-ORBEndpoint";
args[1]="iiop://10.106.90.50:9090";   // client eth0              
ORB orb = ORB.init(args, null);
like image 354
Nanaji Avatar asked Jul 06 '26 17:07

Nanaji


1 Answers

First of all you should not specify any port number (e.g. in case that port is already bound by another process), but only the IP address. The port number should be chosen randomly by the ORB, from available ports.

Then you can configure this Java property:

-Dcom.sun.CORBA.ORBServerHost=<IP address>

or if you really want to hardcode it:

Properties p = new Properties();
p.put("com.sun.CORBA.ORBServerHost", "10.106.90.50");
ORB orb = ORB.init(args, p);

ORBEndpoint is a configuration for omniORB, not for the Sun/Oracle Java ORB.

like image 99
Wernke Avatar answered Jul 09 '26 07:07

Wernke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!