About The Java 2 ORB
The Java IDL ORB that ships with the Java 2 platform allows applications to run either as stand-alone Java applications or as applets within Java-enabled browsers. It uses IIOP as its native protocol.
The Sun Java ORB is fairly generic. This is good, because there are few surprises; however, there are many advanced features of CORBA that are missing. There is no Interface Repository (though Java IDL clients can access an Interface Repository provided by another Java or C++ ORB), Transaction Service, or POA, for example. For a complete list of these unimplemented features, see the CORBA Package JavaDoc Comments — scroll down to find the section near the bottom of the page describing these shortcomings.
Java IDL is structured with a “pluggable ORB” architecture, which allows you to instantiate ORBs from other vendors from within the Java Virtual Machine. This is accomplished through setting environment variables, or system properties, or at run time through the use of a Properties or String[] object. See the CORBA Package JavaDoc Comments for more details (scroll down past the list of classes to find the appropriate sections).
idltojava Notes
If you don't have the idltojava compiler, you can find it at the Java IDL web site.
By default, idltojava tries to run a C preprocessor on the IDL files before compiling them. Unfortunately, if you do not have a C preprocessor installed on your system, or if idltojava cannot find it, you will see cryptic error message:
Bad command or file name Couldn't open temporary file idltojava: fatal error: cannot preprocess input; No such file or directory
If you get this message, it means you must invoke idltojava with the -fno-cpp option, as follows:
idltojava -fno-cpp foo.idl
System Properties
The ORB.init() method can read in its configuration parameters from a number of different sources: from the application parameters (the first argument to ORB.init()), from an application-specific Properties object (the second argument to ORB.init()), or from the System Properties (defined on the command line by -D flags).
Quoted verbatim from the Java IDL guide:
Currently, the following configuration properties are defined for all ORB implementations:
org.omg.CORBA.ORBClass
The name of a Java class that implements the org.omg.CORBA.ORB interface. Applets and applications do not need to supply this property unless they must have a particular ORB implementation. The value for the Java IDL ORB is com.sun.CORBA.iiop.ORB.
org.omg.CORBA.ORBSingletonClass
The name of a Java class that implements the org.omg.CORBA.ORB interface. This is the object returned by a call to orb.init() with no arguments. It is used primarily to create typecode instances than can be shared across untrusted code (such as unsigned applets) in a secured environment. The value for the Java IDL ORB is com.sun.CORBA.iiop.ORB.
In addition to the standard properties listed above, Java IDL also supports the following properties:
org.omg.CORBA.ORBInitialHost
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
The port the initial naming service listens to. The default value is 900.