Coborbgen | The Order Example |
The Grid example illustrates support for CORBA within Server Express.
Note: This example application is only available if you have obtained the ORB interface software from MERANT. See the chapter Obtaining Support for details.
To run this example:
This directory contains a simple client and server, written in COBOL, and a makefile. The makefile is there for you to run when you wish to compile both modules and then link them together into an executable.
The source files for the Grid example are listed below:
$COBDIR/demo/corba/grid/gridsv.cbl | |
$COBDIR/demo/corba/grid/gridcl.cbl | |
$COBDIR/demo/corba/grid/makefile |
For details of prerequisites, refer to the section Prerequisites in the Coborbgen chapter.
make orbix
This runs the command line:
coborbgen gridsv -client gridcl -v -make -debug -orbix
which generates the following files:
gridsv_C.cc | C++ for client to invoke remote C++ object |
gridsv_S.cc | C++ to create instance of C++ object |
gridsv_i.h | header file for Object instance |
gridsv_i.cc | C++ instance of object that wraps the COBOL |
gridsv.mak | makefile to build executable |
make -f gridsv.mak
This command compiles all the generated code and then links it all together with the appropriate libraries.
putit
within the generated makefile to
register the application with Orbix:
make -f dbac.mak putit
gridsv-c
The generated client can accept a hostname on the command line but,
by default, uses the local host. (You can, of course, start your
gridsv-s
server manually, if you so wish.)
killit
as
follows:
killit gridsv
make visi
This runs the command line:
coborbgen gridsv -client gridcl -v -make -debug -visi
which generates the following files:
gridsv.idl | IDL for the interface to the component |
gridsv-s.cbl | wrapper to handle COBOL datatypes for server |
gridsv-c.cbl | wrapper to handle COBOL datatypes for client |
gridsvC.cc | C++ for client to invoke remote C++ object |
gridsvS.cc | C++ to create instance of C++ object |
gridsv_i.h | header file for object |
gridsv_i.cc | C++ instance of object that wraps the COBOL |
gridsv.mak | makefile to build executable |
make -f gridsv.mak
This command compiles all the generated code and then links it all together with the appropriate libraries.
gridsv-s
server by typing:
gridsv-s &
gridsv-c
client by typing:
gridsv-c
Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Coborbgen | The Order Example |