Orbix 2000 Configuration
iPlanetTM Application Server Samples

Updated June 11, 2001

The following instructions describe how to install and configure IONA's Orbix 1.2.1 ORB as well as how to configure iPlanet Application Server to use this ORB to access backend CORBA objects from the application server.

Download and Install Orbix 2000

If you do not already have a copy of Orbix 2000, an evaluation copy is available for download from the IONA web site.  If you already have Orbix installed, then proceed to the next section, Run the Orbix "Simple" Sample .

Read through the Orbix Installation Guide before attempting to install Orbix. The basic installation steps are as follows:

1. Unzip the download distribution and run the installation executable.

Windows:

Orbix2000_win32_vc60_dev.exe

Solaris:

Before installing Orbix, ensure that you've installed the required patches. See the Orbix Installation Guide for details.

You must also ensure that your JAVA_HOME environment variable specifies the location of a Java 2 1.2.1 installation. Assuming that you have iPlanet Application Server installed, you can set JAVA_HOME in the following manner:

JAVA_HOME=<iPlanet install>/ias/usr/java
export JAVA_HOME

Now install Orbix by executing:

O2K_sun_52_jdk_dev.bin

2. Select "Java Development Kit" to support development of Java-based CORBA applications.

3. As installation completes, enter license information as provided in the evaluation license e-mail message.

4. On Windows, restart your computer.

Run the Orbix "Simple" Example to Verify Basic ORB Configuration

To ensure that the CORBA environment is configured correctly, run the "Simple" example as provided in the Orbix distribution using the JVM bundled in iPlanet Application Server. After you've successfully run this application, the next step will be to deploy and run either a servlet or EJB-based client against the same server side CORBA object. The following instructions assume that you have installed Orbix with the default settings and that the default domain named "localhost" is defined.

1.  Ensure that JAVA_HOME specifies the JVM bundled in iPlanet Application Server.

2. Build the Orbix samples.

First, setup Orbix environment for the default "localhost" domain. Run the environment setup script:

Windows:

cd <IONA install path>\bin
./localhost_env

Solaris:

cd <IONA install path>/bin
. ./localhost_env

Then navigate to the demos\simple directory:
 cd ..\orbix_art\1.2\demos\simple
In the demos\simple directory, execute the appropriate script to build the Orbix sample applications.

Windows:

build all

Solaris:

make all

The build process may take several minutes to complete.
3. Start the Server Component
In the demos\ directory and execute the following command to start the server:
it_java demos.simple.Server
You should see the following messages:
Initializing the ORB
Creating objects

Activating the POA Manager

Giving control to the ORB to process requests
4. Run the Client Application
Start a new DOS or UNIX terminal window, set the environment variables and run the client application.

Windows:

cd <IONA install path>\bin
localhost_env

cd ..\orbix_art\1.2\demos

it_java demos.simple.Client

Solaris:

cd <IONA install path>/bin
. ./localhost_env

cd ../orbix_art/1.2/demos

it_java demos.simple.Client

As the client runs, you should see the following messages on the server side DOS/terminal window:
Calling SimpleInheritanceImpl::call_me()
Calling SimpleDelegate::call_me()
In the client window, you should see the following:
Initializing ORB
Invoking method on first object

Reading object reference from ../simple1.ior

Invoking method on second object

Reading object reference from ../simple2.ior

Done
The client has successfully accessed the server side CORBA component.  Now that you've verified that the sample works properly with the JVM bundled with the application server, the next step is to configure the application server to use the Orbix ORB classes.

Configure iPlanet Application Server to Use Orbix 2000

To learn more about configuring the application server to support commercial ORBs and about running RMI/IIOP clients using the bundled iPlanet ORB while using a commercial ORB to support backend access to existing CORBA systems, see Overriding the Built-in ORB.

Before using servlet and EJB clients to access backend CORBA objects, the iPlanet Application Server runtime environment must be configured to enable the application server to load the Orbix ORB classes. The manner in which the application server's CLASSPATH is modified differs on Windows and UNIX. The following additions must be made to the CLASSPATH:

Windows:

On Windows the application server uses the CLASSPATH setting defined in the application server's registry. (Setting the Windows system environment variable CLASSPATH will not affect the setting used by the application server). To modify the registry:
Solaris:

See the sample application Getting Started Guide for more information on modifying the server's classpath.

For SP3, modify the common environment setting shell script iasenv.ksh to set the classpath:

install_dir/ias/iasenv.ksh:

...
...
ORBIX_CLASSES=/etc/opt/iona:/opt/iona/orbix_art/1.2/classes/omg.jar:/opt/iona/orbix_art/1.2/classes/orbix2000.jar

# Union of all CLASSPATHS
export CLASSPATH=
$ORBIX_CLASSES:${TOMCAT_DIR}/jasper.jar:...

For SP2, modify the install_dir/ias/bin/kjs script to include the Orbix JAR file.  The kjs script starts the JVM that houses the application server's web and EJB containers. Note that the /etc/opt/iona directory is added to the CLASSPATH because it is the default location of the Orbix license file.

install_dir/ias/bin/kjs:

...
ORBIX_CLASSES=/etc/opt/iona:/opt/iona/orbix_art/1.2/classes/omg.jar:/opt/iona/orbix_art/1.2/classes/orbix2000.jar
CLASSPATH=$ORBIX_CLASSES:
$THIRD_PARTY_JDBC_CLASSPATH:$GX_ROOTDIR/classes/java/jdbc20.jar:
$GX_ROOTDIR/classes/java/javax.jar:...

(Since changes to the the user's environment will not take effect when the application is started through the iascontrol command line interface and the Administration Tool, it is not advisable to set the location of the ORB classes in your UNIX user environment's CLASSPATH.).

After modifying the kjs script, restart the application server to pickup the changes.

Now that the application server is configured for Orbix, proceed to Deploying and Exercising the Samples.

Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved.