|
Downloads: You will need OrbixWeb to test the client Getting Started: Win95 system environment settings for OrbixWeb:
|
REM SET PATH=C:\Iona\OrbixWeb3.0\bin;%path% REM |
Server.java |
// Building Distributed Object Applications with CORBA // Infowave (Thailand) Co., Ltd. // http://www.waveman.com // Jan 1998 import java.io.*; public class Server {
org.omg.CORBA.BOA boa = null;
// TIE uses these two new lines AircraftCarrierImpl new_carrier = new
AircraftCarrierImpl(boa);
try {
System.out.println(carrier + " ready for launch !!!"); // Write the Aircraft Carrier's object reference to an IOR file so Orbix Client can access try
// End IOR try {
|
Client.java |
// Building Distributed Object Applications with CORBA // Infowave (Thailand) Co., Ltd. // http://www.waveman.com // Jan 1998 import java.io.*; public class Client
org.omg.CORBA.Object objRef = null; // Read IOR from file try
// End IOR Ship.AircraftCarrier carrier = null;
// Standard program continues String flight = args.length > 0 ? args[0]: "Ghost Rider 101"; Ship.Aircraft aircraft = null;
String designation = aircraft.codeNumber(); System.out.println ("Aircraft " + designation
+ " is coming your way");
|
Building the server with VisiBroker: Create a directory and place Ship.idl, Server.java, AircraftCarrierImpl.java, and AircraftImpl.java into it.
|
prompt> idl2java Ship.idl prompt> vbjc Server.java |
Building the client with OrbixWeb: Place Client.java into the same directory as above
|
prompt> idl Ship.idl prompt> owjavac Client.java java_output\Ship\*.java |
Running the program: Now start the Smart Agent and server in one window, client in another window
|
prompt> osagent prompt> vbj Server prompt> owjava Client |