Sun Java Communications Suite 5 Event Notification Service Guide

Messaging Server

The libraries for Messaging Server are located in the following directory:

msg-server-base/lib

Refer to msg-server-base/examples/enssdk/Makefile.sample to help determine what libraries are needed. This makefile contains instructions on how to compile and run the apub and asub programs. This file also describes what libraries are needed, and what the LD_LIBRARY_PATH should be. The following listing shows a sample makefile.sample file.


Example 1–1 Makefile.sample File


#
# Sample makefile
#
# your C compiler
CC = gcc

# LIBS
# Your library path should include <msg-server-base>/lib
LIBS = -lens -lgap -lxenp -lcyrus -lchartable -lyasr -lasync

all: apub asub

apub: apub.c
        $(CC) -o apub -I ../include apub.c $(LIBS)

asub: asub.c
        $(CC) -o asub -I ../include asub.c $(LIBS)

run:
        @echo ’run <msg-server-base>/start-ens’
        @echo run asub localhost 7997
        @echo run apub localhost 7997

                  


Note –

The Windows distribution includes the following additional files:

msg-server-base\bin\msg\enssdk\examples

bin\msg\enssdk\examples\libens.lib

bin\msg\enssdk\examples\libgap.lib

bin\msg\enssdk\examples\libxenp.lib

bin\msg\enssdk\examples\libcyrus.lib

bin\msg\enssdk\examples\libchartable.lib

bin\msg\enssdk\examples\libyasr.lib

bin\msg\enssdk\examples\libasync.lib

bin\msg\enssdk\examples\asub.dsw

bin\msg\enssdk\examples\apub.dsp

bin\msg\enssdk\examples\asub.dsp

To build on Windows platforms:

  1. A sample VC++ workspace is provided in asub.dsw. It has two projects in it: asub.dsp and apub.dsp.

    The required .lib files to link is in the same directory as asub.c and apub.c.

  2. To run, it requires that the following DLLs are in your path.

    libens.dll
    libgap.dll
    libxenp.dll
    libcyrus.dll
    libchartable.dll
    libyasr.dll
    libasync.dll

    The simplest way to accomplish this is to include msg-server-base in\msg\lib in your PATH.