Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Hubert Klein Ikkink (aka Mr.Haki) - Communications Officer TAS Advanced Technologies
 VisiBroker for Java 4 / Linux
See Also: CORBA Book Reviews or Programming Papers

In this article we will take a look at VisiBroker for Java 4 on Linux. We can download a 60-day evaluation version of VisiBroker for Linux at Borland's website.

Installing VisiBroker for Java 4
Before we can install VisiBroker for Java we must unpack the tar file:
   tar xvf vbj40_linux_rh60.tar
Then we can invoke the installation script:
   ./setup
A Java installer is started to install VisiBroker. So we have to be sure we have a Java runtime environment on your system. During the installation the location of the installation is asked. For the most part we can use the default values. Adjust settings as you please for your own installation.

After the installation a file called vbroker.sh is placed in the root folder of VisiBroker. This script contains a set of instructions for setting the environment. We must run this script once to make sure we can invoke the VisiBroker tools from the shell.

Installing the VisiBroker Console
If you have ever worked with VisiBroker before you will know, must tools we use are command line tools. No fancy graphics or anything like that. We had to use an IDE like JBuilder to get a more graphically view of all the CORBA services and objects running on the ORB. But now we have VisiBroker Console, a graphical interface for the CORBA services and objects on the ORB. We can still use tools like osfind, but it will look better in VisiBroker Console and we get a better overview using Console.

We can download a Linux version of VisiBroker Console, there is only a Solaris and Windows version. But we can install the Solaris version under Linux without any problems.

First we unpack the tar file and then we can start the installation by invoking ./setup. We only have to tell the installation application where to place VisiBroker Console. After the installation we must start Console with the console.sh file in the bin folder of the VisiBroker Console installation.

The following image shows VisiBroker Console running with a couple of CORBA services running:

VisiBroker Console

Setting up JBuilder 3.5 Enterprise
To create Java apps with VisiBroker we must set up JBuilder 3.5 Enterprise so we can compile the Java applications from within the IDE.

Installing JBuilder 3.5 for Linux is quit easy. We only have to follow the installation instructions and everything will work fine. I installed JBuilder 3.5 Enterprise on a SuSe 6.3 system. It is important to have downloaded and installed the JDK1.2.2 for Linux from the JavaSoft website.

To use CORBA in JBuilder 3.5 we must first setup CORBA in JBuilder. Go to Tools | CORBA Setup.... The following dialog will be shown:

CORBA Setup...

JBuilder stores all information about specific ORB vendors, like how to compile IDL files, in separate configurations. This way it is easy to switch between different ORB vendors.
A VisiBroker configuration already exists and because we will be using VisiBroker we have to select it here.

We still have to make some adjustments to the configuration, so we click on the Edit... button. This will open a new dialog window:

Changing VisiBroker configuration

Check to see if the path to the ORB tools is correct. If it isn't we can change it here. Next we must create a library with all the necessary VisiBroker JAR files, so we compile our Java CORBBA applications. The library will be used for every project we want to use CORBA for.
We must take the following steps:

Our CORBA Setup dialog will now look something like this:

CORBA Setup...

With the option Apply this configuration to the current project we can immediately use the CORBA configuration for the current project.
The option Make this configuration's ORB the default for the Java VM will configure the Java VM, so it will use the ORB from this setup. Java 2 already contains an ORB and to override the default Java ORB a file called orb.properties will be placed in the lib folder of the Java runtime environment. This file contains the ORB classes which will be used instead of the default Java ORB. Selecting the option in this dialog will make sure the correct orb.properties file is placed with the Java VM. You must have write rights as a user to succesfully use this option. You can always create the file by hand. It has the following contents:
   org.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB
   org.omg.CORBA.ORBSingleton=com.inprise.vbroker.orb.ORB

The option Add a VisiBroker SmartAgent item on the Tools menu will add a menu option to the Tools menu to start and stop the VisiBroker SmartAgent.

OK, we now have installed VisiBroker 4 for Java and set it up in JBuilder 3.5: we are ready to start developing CORBA applications, such as a JBuilder 3.5 CORBA Client that connects to a Delphi 5 CORBA Server on WinNT.


This webpage © 2000-2009 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.