Sun Java System Messaging Server 6.3 Administration Guide

B.2 Running Sample Event Notification Service Programs

Messaging Server contains sample programs to help you learn how to receive notifications. These sample programs are located in the msg-svr-base/examples directory.

ProcedureTo Run the Sample ENS Programs

  1. Change to the msg-svr-base/examples directory.

  2. Using a C compiler, compile the apub and asub examples using the Makefile.sample file. Set your library search path to include the msg-svr-base/examples directory.

  3. Once the programs have been compiled, you can run them as follows in separate windows:

    apub localhost 7997

    asub localhost 7997

    Whatever is typed in the apub window should appear on the asub window. Also, if you use the default settings, all iBiff notifications should appear in the asub window.

  4. To receive notifications published by iBiff, write a program similar to asub.c

    For more information on the sample programs, and writing your own programs for ENS, see the Sun Java Communications Suite 5 Event Notification Service Guide.


    Note –

    Once you set your library search path to include the msg-svr-base/lib directory, you can no longer stop and start the directory server. The workaround is to remove the entry from the library search path.