Setting up JBuilder for CORBA applications

Distributed application development is a feature of JBuilder Enterprise.

This chapter explains how to set up JBuilder with an ORB (VisiBroker or OrbixWeb) and the Java Development Kit (JDK) so that you can create, run, and deploy CORBA applications. The tutorials in this book use the VisiBroker ORB because it is included in some versions of JBuilder. Consult the OrbixWeb documentation for information on particular features of that ORB.

To set up these pieces on your system:

  1. Install the JDK (this may be installed with JBuilder).

  2. Install JBuilder Enterprise edition.

  3. Install an ORB, such as VisiBroker or OrbixWeb.

    In some versions of JBuilder, VisiBroker, with a development license only, is included on your JBuilder CD. Refer to the install.txt file in the VisiBroker directory on your CD for information on installing this version of VisiBroker.

  4. From JBuilder, run Tools|Enterprise Setup, and select the CORBA tab. Setting the parameters in this dialog enables JBuilder to see the ORB.

  5. Select a configuration. The initial choices are VisiBroker and OrbixWeb. Select one. The dialog looks like this:

    CORBA tab Enterprise Setup

  6. Click the Edit button.

  7. Click the ellipsis button next to the Path For ORB Tools field to enable JBuilder access to the ORB tools. When using VisiBroker, point to the directory that contains the osagent.exe file, which may be inprise/vbroker/bin or inprise/IAS/bin.

  8. Click the ellipsis button next to the Library For Projects field to add the library for the ORB to the projects. This is necessary for compiling the generated stubs and skeletons and for executing an application.

    1. Click New.
    2. Enter a Name for the new library in the Name field (either VisiBroker or OrbixWeb, for example).
    3. Select a location for the library: the JBuilder directory, the project directory, or the user's home directory.
    4. Click Add to browse to the library (JAR) file. When using VisiBroker, the library file vbjorb.jar may be located in the /inprise/vbroker/lib/ directory.
    5. Click OK until you are back to the Edit Configuration dialog.

      This dialog should look something like this:

    6. Click OK.
  9. Leave the Apply This Configuration To The Current Project selected if the current project should be set to the same ORB configuration as the default project.

  10. Leave the Make This Configuration's ORB The Default For The Java VM option selected to use this ORB as the default ORB for the Java VM. If you receive an error message, you many not have sufficient rights to modify the orb.properties file, located in the jdk/jre/lib/ directory. You can manually create and/or edit this file, specifying the following information. This sample file references the VisiBroker ORB.

    # Make VisiBroker for Java the default ORB
    org.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB
    org.omg.CORBA.ORBSingletonClass=com.inprise.vbroker.orb.ORB
    
    

  11. Select Add A VisiBroker SmartAgent Item To The Tools menu to enable the SmartAgent to run as a JBuilder service during development. This option will be disabled if the SmartAgent is not necessary.

  12. Select a port on which to run the SmartAgent. The default port of 14000 will work on most systems.

  13. Click OK. These settings will be written to the orb.properties file of the /jdk/jre/lib/ directory.

You've now completed setting up your system to use the JBuilder CORBAExpress features. For a tutorial that uses these features to create a CORBA application, see Exploring CORBA-based distributed applications in JBuilder.