Reputation: 116187
Properties aProperties = new Properties();
aProperties.put("org.omg.CORBA.ORBInitialHost", "localhost");
aProperties.put("org.omg.CORBA.ORBInitialPort", "2930");
ORB orb = ORB.init((String[]) null, aProperties);
//Get the stringified reference over TCP (String ior)
org.omg.CORBA.Object cmdObject = orb.string_to_object(ior);
this.corba = OGE_CMDHelper.narrow(cmdObject);
What exactly do org.omg.CORBA.ORBInitialHost
and org.omg.CORBA.ORBInitialPort
represent? Is is it the hostname and address of the receiving endpoint of CORBA commands (the location of the implemented objects)? Or is it the hostname and port of the local CORBA ORB that is transmitting CORBA messages to the receiver? Or is it something else entirely?
Upvotes: 3
Views: 3861
Reputation: 9401
Regarding the Java SE documentation (new link inserted)
org.omg.CORBA.ORBInitialHost
is
The host name of a machine running a server or daemon that provides initial bootstrap services, such as a name service. The default value for this property is localhost for applications. For applets it is the applet host, equivalent to getCodeBase().getHost().
org.omg.CORBA.ORBInitialPort
is
The port the initial naming service listens to. The default value is 900.
Upvotes: 3
Reputation: 19305
Believe it or not, they represent the host/port pair for the Naming Service that your client ORB will try to contact (the Naming Service is basically a telephone book for CORBA object references). You can see them in action with it in this diagram.
Oddly enough, these properties were never standardized by the OMG, but for some reason the Sun ORB packaged them within org.omg.CORBA
and made it look like they were standardized (see the little tidbit at the bottom of this IBM page). If you're really interested in reading old CORBA history, this OMG issue discusses them a little bit.
The standardized approach to the problem of bootstrapping your client to find the Naming Service was defined in the CORBA Interoperable Naming Service (INS) spec, and it's what you should use here if you can.
Upvotes: 2