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

JBiff Sample Program

ProcedureTo compile the JBiff 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

    JavaMail - full-path/javamail-1.2/mail.jar

    Java Activation Framework - full-path/jaf-1.0.1/activation.jar

  2. Change to the msg_server_base/bin/msg/enssdk/java directory.

  3. Run the following command:

    javac com/iplanet/ens/samples/

ProcedureTo run the JBiff sample program:

Before You Begin

To run the JBiff sample program, you need to load the ENS (iBiff) plug-in. See Appendix C in the Messaging Server Administrator’s Guide for instructions.

Note –

The demo is currently hardcoded to use the ENS event reference enp:// This is the default event reference used by the iBiff notification plug-in.

  1. Change to the msg_server_base/bin/msg/enssdk/java directory.

  2. Run the following:

    java com.iplanet.ens.samples.JBiff
  3. The program prompts for your userid, hostname, and password.

    The code assumes that the ENS server and the IMAP server are running on hostname. The userid and password are the IMAP username and password to access the IMAP account.

    The two test programs are ENS subscribers. You receive events from iBiff when email messages flow through Messaging Server. Alternately you can use the apub C sample program to generate events. See Sample Code for more information.