The Grid Example | Obtaining Support |
The Order example illustrates the 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 Order example are listed below:
$COBDIR/demo/corba/order/ACCOUNT.CPY | |
$COBDIR/demo/corba/order/CUSTOMER.CPY | |
$COBDIR/demo/corba/order/custordr.cbl | |
$COBDIR/demo/corba/order/DB.CPY | |
$COBDIR/demo/corba/order/dbac.cbl | |
$COBDIR/demo/corba/order/ORDER.CPY | |
$COBDIR/demo/corba/order/makefile |
For details of prerequisites, refer to the section Prerequisites in the Coborbgen chapter.
make orbix
This runs the command line:
coborbgen dbac -client custordr -v -make -debug -orbix
which generates the following files:
dbac.idl | IDL for the interface to the component |
dbac-s.cbl | wrapper to handle COBOL datatypes for server |
dbac-c.cbl | wrapper to handle COBOL datatypes for client |
dbac_C.cc | C++ for client to invoke remote C++ object |
dbac_S.cc | C++ to create instance of C++ object |
dbac_i.h | header file for Object instance |
dbac_i.cc | C++ instance of object that wraps the COBOL |
dbac.mak | makefile to build executable |
make -f dbac.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
dbac-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
dbac-s
server manually, if you so wish.)
killit
as
follows:
killit dbac
make visi
This runs the command line:
coborbgen dbac -client custordr -v -make -debug -visi
which generates the following files:
dbac.idl | IDL for the interface to the component |
dbac-s.cbl | wrapper to handle COBOL datatypes for server |
dbac-c.cbl | wrapper to handle COBOL datatypes for client |
dbacC.cc | C++ for client to invoke remote C++ object |
dbacS.cc | C++ to create instance of C++ object |
dbac_i.h | header file for Object instance |
dbac_i.cc | C++ instance of object that wraps the COBOL |
dbac.mak | makefile to build executable |
make -f dbac.mak
This command compiles all the generated code and then links it all together with the appropriate libraries.
dbac-s
server by typing:
dbac-s &
dbac-c
client by typing:
dbac-c
You can now use the client to create customers and list their details. The details are saved within a file that the server creates.
Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
The Grid Example | Obtaining Support |