Sun Java System Communications Services 6 2005Q4 Event Notification Service Guide

JmsSample Program

ProcedureTo compile the JmsSample program

Steps
  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/bin/msg/enssdk/java directory.

  3. Run the following command:


    javac com/iplanet/ens/samples/JmsSample.java

ProcedureTo run the JmsSample program:

Steps
  1. Change to the msg_server_base/bin/msg/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://127.0.0.1/store)

    • 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.