CORBA 2.6 Programmer's Guide for Java

System Services, you can run your program on either the PC or on the NSK system. You will get the same
execution results.
The example that follows later in this section shows that you can develop NonStop CORBA applications using
JORB Lite, move the compiled .class bytecode files to the OSS environment, and run the applications using
NonStop CORBA.
Caution: The JORB Lite environment is provided for application development. The JORB Lite
environment is not to be used for production.
To see an example of building and running an application in the PC environment, see the Stock sample
program, found at C:\jorblite\javasamples\stock. This sample also demonstrates portability of a
Java CORBA application between JORB Lite and NonStop CORBA.
JORB Lite Applet Support
JORB Lite supports both Java applications and Java applets. However, because of the constraints placed on Java
applets by both the Java and OMG specifications, applets are treated differently from Java applications. This
topic discusses some of these differences and how they relate to the CORBA applet programs you create using
JORB Lite.
Initializing the ORB
Java applets and Java applications make different calls to initialize the ORB:
org.omg.CORBA.ORB.init()
The difference can be seen in the following sample code fragments. A Java application initializes the ORB by
using the following signature of the init() call:
public static ORB init(String[] args, Properties props)
A Java applet uses the following signature for the ORB initialize call:
public static ORB init(Applet app, Properties props)
Java Applet Configuration
JORB Lite applets and applications use different mechanisms to obtain the NonStop CORBA framework
configuration information. With JORB Lite, applications obtain configuration information from the
configuration file specified by the application parameter ORBlitedbm. However, Java applets have a
restriction in that they cannot read data from local disk files. Because of this restriction, JORB Lite applets must
use applet parameters to gain the configuration information.
JORB Lite applets retrieve the NonStop CORBA framework configuration information when they make the
following object call:
org.omg.CORBA.ORB.init(Applet applet, Properties props)
When used with the applet signature, the ORB.init() method inspects specific HTML PARAM tags specified
in the HTML APPLET tag. Through these PARAM tags the applet obtains the ORB configuration.
Specifically, the Java applet ORB.init() call uses the Java applet parameters shown in Table 121.