ORB initialization

In a stand-alone Java™ application, the client must create an instance of the ORB.

The ORB instance is created by calling the static method init(...). For example:
ORB orb = ORB.init(args,props);
The parameters that are passed to the method are:
  • A string array containing property-value pairs.
  • A Java Properties object.

A similar method is used for an applet. The difference is that a Java Applet is passed instead of the string array.

The first step of ORB initialization is to process the ORB properties.

The properties are found by searching in the following sequence:
  1. First, check in the applet parameter, or application string array.
  2. Check in the properties parameter, if the parameter exists.
  3. Check in the system properties.
  4. Check in any orb.properties file that is found in the <user-home> directory.
  5. Check in any orb.properties file that is found in the <java-home>/lib directory.
  6. Finally, use hardcoded default behavior.

Start of changes for service refresh 3 fix pack 10From service refresh 3, fix pack 10, the order of precedence is changed.End of changes for service refresh 3 fix pack 10

Start of changes for service refresh 3 fix pack 10The properties are found by searching in the following sequence:
  1. First, check in the applet parameter, or application string array.
  2. Check in the properties parameter, if the parameter exists.
  3. Check in the system properties.
  4. Check in any orb.properties file under the directory that is specified by the JVM property com.ibm.CORBA.ORBPropertyFilePath.
  5. Check in any orb.properties file that is found in the <user-home> directory.
  6. Check in any orb.properties file that is found in the <java-home>/lib directory.
  7. Check in any orb.properties file that is found in the CLASSPATH (including JAR files).
  8. Finally, use hardcoded default behavior.
For more information about the property com.ibm.CORBA.ORBPropertyFilePath, see -Dcom.ibm.CORBA.ORBPropertyFilePath.End of changes for service refresh 3 fix pack 10

Two important properties are ORBClass and ORBSingletonClass. These properties determine which ORB class is created and initialized, or instantiated.

After the ORB is instantiated, it starts and initializes the TCP transport layer. If the ListenerPort property was set, the ORB also opens a server socket to listen for incoming requests. The ListenerPort property is used by a server-side ORB. At the end of the initialization process that is run by the init() method, the ORB is fully functional and ready to support the client application.