Working with CORBA

CORBA Application Vendor Classes

Running CORBA applications with JDK1.2 or later, might load the JDK internal CORBA classes instead of the specific vendor CORBA classes. To force the virtual machine to use the vendor classes, specify the following java.exe command-line parameters:

Visigenic 3.4
     ORBSingleton Visigenic 4.0 -Dorg.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=com.inprise.vbroker.orb.ORBSingleton OrbixWeb 3.x -Dorg.omg.CORBA.ORBClass=IE.Iona.OrbixWeb.CORBA.ORB -Dorg.omg.CORBA.ORBSingletonClass=IE.Iona.OrbixWeb.CORBA.
     singletonORB OrbixWeb 2000

Note: Java 8 is not supported in CORBA.

Editing a CORBA Vuser Script

CORBA-specific scripts usually have a well-defined pattern. The first section contains the ORB initialization and configuration. The next section indicates the location of the CORBA objects. The following section consists of the server invocations on the CORBA objects. The final section includes a shutdown procedure which closes the ORB. Note that pattern is not mandatory and that each one of these sections may appear multiple times within a script.

In the following segment, the script initializes an ORB instance and performs a bind operation to obtain a CORBA object. VuGen imports all the necessary classes.

import org.omg.CORBA.*;
import org.omg.CORBA.ORB.*;
public class Actions {
   public int init() throws Throwable {
// Initialize Orb instance...
   MApplet mapplet = new MApplet("http://chaos/classes/", null);
   orb = org.omg.CORBA.ORB.init(mapplet, null);
// Bind to server...
   grid = grid_dsi.gridHelper.bind("gridDSI", "chaos");
   return lr.PASS;

The org.omg.CORBA.ORB function makes the connection to ORB. Therefore, it should only be called once. When running multiple iterations, place this function in the init section.

In the following section, VuGen recorded the actions performed on a grid CORBA object.

 public int action() throws Throwable {
   grid.set(2, 4, 10);
   grid.get(2, 4);
   return lr.PASS;

At the end of the session, VuGen recorded the shutdown of the ORB. The variables used throughout the entire recorded code appear after the end method and before the Actions class closing curly bracket.

 public int end() throws Throwable {
        if (lr.get_vuser_id() == -1)
        return lr.PASS;
// Variable section
    org.omg.CORBA.ORB orb;
    grid_dsi.grid ;

Note: The ORB shutdown statement was customized for this product. This customization prevents a single Vuser's shutdown from shutting down all other Vusers.

Back to top