Sun Java Communications Suite 5 Event Notification Service Guide

JmsSample Program

ProcedureTo compile the JmsSample program

  1. Set your CLASSPATH to include the following:

    ens.jar file - ens.jar

    (For Messaging Server, the ens.jar is located in the msg-server-base/java/jars/ directory.)

    Java Message Service - full-path/jms1.0.2/jms.jar

  2. Change to the msg-server-base/examples/enssdk/java directory.

  3. Run the following command:

    javac com/iplanet/ens/samples/

ProcedureTo run the JmsSample program:

  1. Change to the msg-server-base/examples/enssdk/java directory.

  2. Run the following command:

    java com.iplanet.ens.samples.JmsSample
  3. You are prompted for three items:

    • ENS event reference (for example, for Messaging Server: enp://

    • ENS hostname

    • ENS port (typically 7997)

  4. Publish events.

    For Messaging Server, the two ways to publish events are:

    • You can use the apub C sample program for ENS. See Sample Code

    • If you have enabled ENS, configure iBiff to publish Messaging Server related events.

    For Calendar Server, events are published by the Calendar Server.