JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Intelligent Event Processor Service Engine Tutorial     Java CAPS Documentation
search filter icon
search icon

Document Information

Using the IEP Service Engine in a Project

Prerequisites

Software Needed for the Tutorial

Configuring and Starting the GlassFish Application Server

To Check the Status of the GlassFish Application Server

To Configure the GlassFish Application Server:

To Start the GlassFish Application Server:

Creating an Intelligent Event Processor Module Project

To Create an Intelligent Event Processing Project

To Add IEP Operators from the Palette to the Design Area

Creating and Deploying the Composite Application

To Create and Deploy the Composite Application

Testing the quotesJBI Application

To Create the Database Connection

To Create the Database Connection

Running the Java Project

To Run the Java Project

Summary

Testing the quotesJBI Application

To Test the quotesJBI Application, create a connection to the Java DB database server from within your NetBeans IDE. This connection enables you to view the content of the database tables.

You will use a Java Project to insert new quotes into the event stream, and you can then observe the two latest stock quotes in the table Latest2Quotes.

To Create the Database Connection

In this section, you create a connection to the Java DB database server from within your NetBeans IDE and examine the appropriate table in the database.

To Create the Database Connection

  1. In the Runtime window of NetBeans, right-click Databases and select New Connection. The New Database Connection window opens.
  2. Input jdbc:derby://localhost/iepseDB for Database URL, iepseDB for User Name, and iepseDB for Password.
  3. Check Remember password during this session, and click OK. Notice the folder jdbc:derby://localhost/iepseDB[iepseDB on IEPSEDB] now exists under the folder Databases. A connection to the Java DB database server from within NetBeans IDE is created.
  4. Expand the folder jdbc:derby://localhost/iepseDB[iepseDB on IEPSEDB] and then expand the subfolder Tables.
  5. Right-click LATEST2QUOTES, and select View Data. Notice that this table is empty.

    Next you will insert stock quotes into the event stream, and observe the two latest stock quotes as updates in the Latest2Quotes table.

Running the Java Project

In this section, you open the Java application provided with this tutorial to send an event stream to test the IEP project.

To Run the Java Project

  1. Create a directory on your file system named IEPTut and unzip the iepquotesender.zip file into the directory.
  2. From the main window of the Projects window of the IDE, choose File > Open Project.
  3. Browse to the IEPTut directory that you just created and select the iepquotessender project.
  4. Leave the checkbox Open as Main Project selected and click Open Project Folder. A progress dialog box appears and then a node for the quotesSender project appears in the Projects window.
  5. Right-click quotesSender project and select Run Project. This sends a SOAP message to the event processor quotes.iep.
  6. In the Output window make sure the quotesSender(run) tab is selected.
  7. In the Output window, Input field, type y and press Enter.
  8. Click the Run SQL button (green arrow) in the SQL command window and you will see the latest quote in the table LATEST2QUOTES .
  9. Repeat steps 6-8 to send another quote from the iepquotessender project. Note the following:
    • The latest 2 quotes in table LATEST2QUOTES are changed.

    • Quote (ADBE, 63) is deleted from the table. This is because the TupleBasedWindow operator in quotes.iep is configured to only keep the latest 2 events.