Programming CORBA with Orbacus on Linux
A simple CORBA client/server pair using CosNaming service
This examples demonstrates the usage of the CosNaming service with a simple example of a client/server pair.
The files we have to write are:
The example can be build using this Makefile.
After succesfull build of all executables, the following steps are required for running the example.
First, you have to setup all PATH and LD_LIBRARY_PATH variables as explained
here.
In the example, we use host 'adrasteia' for running the naming service, 'nike' for running our CORBA
server and 'calera' for starting the client:
adrasteia$ nameserv -OAport 3674
nike$ server adrasteia 3674
calera$ client adrasteia 3674
Note that the server as well as the client have to specify the name and port of the host on which
you have started the CosNaming service (adrasteia:3674 in the example). This is needed to ensure
that resolve_initial_references can resolve the NamingService context. (Some services
as the RootPOA are available without special setup; other services need to be configured this
way.)
back to CORBA page
|