Object Oriented Concepts has an ORB called OmniBroker. This product supports both C++ and Java and is free for non-commercial purposes: http://www.ooc.com/ob/.
OmniBroker comes with a manual that includes a Getting started chapter. Here the authors introduce the idea of communicating with a remote object through its IOR, i.e., this is the technique explained above in the section entitled Using an object's IOR instead of the Naming Service. Elsewhere in the manual, they explain how to use OmniBroker's implementation of the Naming Service. It is run using OmniBroker's nsserv program.
In the previous section, we gave programs where remote objects were located using a Naming Service and we communicated with the Naming Service by using its IOR. If we want to use these programs with OmniBroker (instead of JavaIDL), then two changes have to be made to the CountServer program. First change:
0234: import org.omg.CORBA.ORB;to:
0265: import org.omg.CORBA.ORB; 0266: import org.omg.CORBA.BOA;and also change:
0239: ORB orb = ORB.init(args, null);to:
0271: ORB orb = ORB.init(args, null); 0272: BOA boa = orb.BOA_init(args, null);
The complete texts of the programs where OmniBroker is used instead of JavaIDL are at http://www.dur.ac.uk/barry.cornelius/papers/OB/CountNSIOR/.
Here are the steps needed to use these programs with OmniBroker. First, you need to compile the interface with OmniBroker's jidl command.
setenv PATH /usr/local/utils/OB/current/bin:$PATH jidl --package OB.CountNSIOR --output-dir ../.. Count.idlBecause the Count.idl file has a module called CountApp, this command will create a directory called CountApp in which it puts the files that implement the stub and skeleton objects.
Now compile the server program with a JDK 1.0.2 or JDK 1.1.x compiler, e.g.:
setenv CLASSPATH /usr/local/utils/OB/current/lib/OB.jar setenv CLASSPATH $CLASSPATH:/usr/local/utils/OB/current/lib/CosNaming.jar:../.. javac CountServer.javaThis javac command will compile CountServant.java and CountServer.java and some of the files in the CountApp directory.
Before running the server, we need to start OmniBroker's Naming Service program. We can do this using OmniBroker's nsserv command:
nsserv --ior | tee nsserv.ior &This command line will output the IOR of the Naming Service both to the screen and to the file nsserv.ior.
The server can then be started using a command like:
java OB.CountNSIOR.CountServer `cat nsserv.ior` &This should output:
CountServant: constructor called
Finally, compile the client program with a JDK 1.0.2 or JDK 1.1.x compiler:
javac CountClient.javaand run it:
java OB.CountNSIOR.CountClient `cat nsserv.ior`