Share this page

# Replay with CORBA

You can edit and replay scripts that were previously recorded using the Java Record Replay protocol with CORBA.

CORBA (Common Object Request Broker Architecture) is a powerful distributed application development architecture.

Caution:

- This protocol is supported for replay only. Support for this protocol will be discontinued in future versions.

- Previously recorded scripts might not replay correctly with Java 8 and later.

In this topic:

## CORBA application vendor classes

When running CORBA applications, the JDK internal CORBA classes might be loaded 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
    -Dorg.omg.CORBA.ORBClass=com.visigenic.vbroker.orb.ORB
    -Dorg.omg.CORBA.ORBSingletonClass=com.visigenic.vbroker.orb.
         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
    -Dorg.omg.CORBA.ORBClass=com.iona.corba.art.artimpl.ORBImpl
    -Dorg.omg.CORBA.ORBSingletonClass=com.iona.corba.art.artimpl.
         ORBSingleton

Back to top

## Edit 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.

The pattern is not mandatory and 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.

    Example:
    import org.omg.CORBA.*;
    import org.omg.CORBA.ORB.*;
    import lrapi.lr;

    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.width();
       grid.height();
       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)
                orb.shutdown();
            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

See also:

- Supported Java communication protocols
- Java Record Replay protocol recording tips

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 25.1-25.3 All View Local Help Center View Online Help Center Version: