i-scream documentation viewer

corba.txt

Using CORBA
===========

Contents
--------
 - Setting up JacORB
 - Getting jacorb.properties
 - Running applications with JacORB
 - Future Additions

   tdb1, 09/11/00.

Setting up JacORB
-----------------
NOTE: There are no instructions for setting this up on the 
      public pc's. You probably don't want to anyway :)

JacORB is quite quick and easy to setup on raptor. All it 
takes is a few path modifications, and an alteration to your 
classpath. These are probably easiest added to your .cshrc.

Firstly add the following to your PATH. It should be added 
at the front in case there's another IDL compiling lurking 
around.... (which there is on raptor).

/usr/local/work/co610/JacORB/bin

Then you need to add the following to your CLASSPATH. 
Chances are it was never set in the first place, so just 
bung this in. Don't forget the dot at the end !

/usr/local/work/co610/JacORB/lib/idl.jar:
/usr/local/work/co610/JacORB/lib/jacorb.jar:. 

(This should all be on ONE LINE!)

That should have you ready to go. You just need the 
jacorb.properties file... see below.

On killigrew just replace "/usr/local/work/co610/JacORB"
with "/usr/local/JacORB" in all three places it occurs in
above paths.

Getting jacorb.properties
-------------------------
JacORB reads it's configuration from a text file called 
jacorb.properties. This file should reside in your home 
directory (either /home/cut/username or ~/) and be readable 
by JacORB.

In particular this file contains URLs to get locate various 
CORBA services, the most important being the Name Service. 
The URL points to a file on a webserver which contains a 
stringified CORBA object reference which the Java software 
can make use of.

The servers themselve are running on Killigrew, and the 
object references are on the webserver on the same machine. 
You can download a copy of jacorb.properties from the 
following address. You'll probably need to right-click and 
save it.

http://killigrew.ukc.ac.uk/jacorb.properties

Alterantively, on raptor;

cd ~
wget http://killigrew.ukc.ac.uk/jacorb.properties

NOTE: These CORBA services and the webserver are only 
      available from the UKC network.

Running applications with JacORB
--------------------------------
Compiling applications is as a normal program, using javac. 
However, to run a program you should use jaco instead of 
java. All this does is fire up a few other things... I don't 
know what off hand... it just works :)

A common thing to want to change is the amount of debugging 
info sent back to you by JacORB. The default in the above 
jacorb.properties file is 0, but you can set it with higher 
values (3 may be the highest). The lower the number the less 
info you get. Setting it to 1 gives some nice info about the 
various connections going on. The value in jacorb.properties 
you need to change is;

jacorb.verbosity=0

Future Additions
----------------
Hopefully, if I have time, I will add some brief snippets of 
code to get going with CORBA. In the mean time, the example 
on the CO610 homepage is a good start :)

About
-----
This document was written by Tim Bishop [tdb@i-scream.org] for 
use by the team working on a 3rd year Computer Science 
project called "i-scream". More details can be found on the 
project website;

http://www.i-scream.org