Example: Sending a Subscription Request

Send a subscription request to the adapter, and see a stream record from Event Stream Processor in a Web browser.

Prerequisites
Task
  1. Set the user name and password for the adapter:
    1. Edit adapter.xml.
    2. In the <User> and <Password> elements, enter sybase.
  2. Set the user name and password in the example environment:
    Operating System Step
    Windows
    1. Edit the set_example_env.bat script
    2. Set the ADAPTER_EXAMPLE_USERNAME and ADAPTER_EXAMPLE_PASSWORD variables to sybase.
    UNIX
    1. Edit the set_example_env.sh script
    2. Set the ADAPTER_EXAMPLE_USERNAME and ADAPTER_EXAMPLE_PASSWORD variables to sybase.
  3. Edit the start_adapter.sh script.
  4. Set the JAVA_HOME environment variable to the directory where the Java Runtime Environment (JRE) is installed.
  5. Start Event Stream Processor.
    Operating System Step
    Windows Open a command window:
    1. Start the example cluster:

      start_server_cluster.bat

    2. Add project to the cluster, and start it on the cluster:

      start_project.bat

    UNIX Open a terminal window:
    1. Start the example cluster:

      ./start_server_cluster.sh

    2. Start the project on the cluster:

      ./start_project.sh

  6. Start the adapter.
    Operating System Step
    Windows Open a command window and enter:

    start_adapter.bat

    UNIX Open a terminal window and enter:

    ./start_adapter.sh

  7. Wait five to ten seconds for the adapter to initialize.
  8. Upload a stream record.
    Operating System Step
    UNIX Open a terminal window and enter:

    ./upload.sh

    Windows Open a command window and enter:

    upload.bat

  9. Point the Web browser to the example.swf file. For example:
    http://localhost:80/sybase/example.swf
  10. You see this stream record in the browser window:
    Stream = Stream1
    Opcode = i
    Symbol = IBM
    Price = 12.50