Notification Service Example: Simple Clients

Description

This example provides a set of simple push suppliers and consumers.

Design

The clients are designed to be as simple as possible. Each client (supplier or consumer) is a single class, with common functionality provided in the ChannelUtil class.

How to Build This Example

UNIX

These instructions are based on the Solaris gcc3.2 compiler makefiles.

  1. Ensure that the following environment variables are set:
  2. Ensure that your environment is set up for your compiler and linker. For example, for gcc3.2:

    PATH=/usr/local/gcc-3.2/bin:/usr/ccs/bin:$PATH; export PATH

    LD_LIBRARY_PATH=/usr/local/gcc-3.2/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH

  3. Change to the <TAO install dir>/examples/cc directory.
  4. If you have not done so already, enter the make command to run the makefile. This will compile all of the OpenFusion examples.

Windows NT

  1. Set the environmental property TAO_ROOT=<TAO install dir> where <TAO install dir> is the location into which you have installed TAO.
  2. A global example Microsoft Visual C++ project has been provided. This is called <TAO install dir>\examples\examples.sln. Double-click on the project file to load it into Microsoft Visual C++. For each of the projects lised below, change the project from debug mode to release mode using the Build | Configuration Manager menu option.
  3. Build the OFCommon files.
  4. Build the anyconsumer files.
  5. Build the anysupplier files.
  6. Build the seqconsumer files.
  7. Build the seqsupplier files.
  8. Build the strconsumer files.
  9. Build the strsupplier files.

How to Run This Example

UNIX: Ensure that the environment variable LD_LIBRARY_PATH includes the path to where the common files and the News files were compiled:

LD_LIBRARY_PATH=<TAO install dir>/examples/cc/Common:<TAO install dir>/examples/cc/Notification/news:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH

Windows NT: Start a DOS window. Ensure that your path contains:

<TAO install dir>\bin;<TAO install dir>\examples\cc\bin

  1. Ensure that the Notification Service is running. In order to run the OpenFusion Notification Service you must first install the OpenFusion TCS - JacORB with OpenFusion CORBA Services distribution. This can be obtained from the downloads page by following the OpenFusion CORBA Products software link.

  2. To run one of the simple clients, type the following at the command prompt:
    <client name> -ORBInitRef NotificationService=file://<OF_INSTALL_DIR>/domains/OpenFusion/localhost/NotificationService/NotificationSingleton/NotificationSingleton.ior

    where client name is the executable name of the client to run (listed in the table below), and OF_INSTALL_DIR is the OpenFusion TCS - JacORB with OpenFusion CORBA Services installation directory.

Client NameExecutable Name
Any Push Consumeranyconsumer
Any Push Supplieranysupplier
Sequence Push Consumerseqconsumer
Sequence Push Supplierseqsupplier
Structured Push Consumerstrconsumer
Structured Push Supplierstrsupplier

top
[top]


© PrismTech Limited 2002