Skip Headers
Oracle® Fusion Middleware Release Notes
11g Release 1 (11.1.1) for Microsoft Windows (32-Bit)

Part Number E10132-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

24 Oracle Complex Event Processing

This chapter describes issues associated with Oracle Complex Event Processing (Oracle CEP). It includes the following topics:

24.1 General Issues and Workarounds

This section describes general issue and workarounds. It includes the following topics:

24.1.1 Deprecated API and Schemas

Table 24-1 lists Java API deprecated in 11g Release 1 (11.1.1) and the replacement API, if any.

Table 24-1 Deprecated Java API

Deprecated API Replacement API

com.bea.wlevs.ede.api.Stream

com.bea.wlevs.ede.api.EventChannel

com.bea.wlevs.ede.api.EventSender

com.bea.wlevs.ede.api.RelationSender

com.bea.wlevs.ede.api.StreamSender

com.bea.wlevs.ede.api.EventSink

com.bea.wlevs.ede.api.RelationSink

com.bea.wlevs.ede.api.StreamSink

com.bea.wlevs.ede.api.EventSource

com.bea.wlevs.ede.api.RelationSource

com.bea.wlevs.ede.api.StreamSource

com.bea.wlevs.management.configuration.StageMBean methods relating to event record and playback

com.bea.wlevs.management.configuration.RecordPlaybackMBean

com.bea.wlevs.management.configuration.StageMBean method getRecordPlaybackMBean returning RecordPlaybackMBean


Table 24-2 lists Oracle CEP schema deprecated in 11g Release 1 (11.1.1) and the replacement schema, if any.

Table 24-2 Deprecated Oracle CEP Schema

Deprecated Schema Deprecated in Assembly File? Deprecated in Component Configuration File? Replacement Schema

wlevs:stream

Yes

Yes

wlevs:channel

wlevs:metadata

Yes

N/A

wlevs:property

wlevs:function attribute epl-name

Yes

N/A

wlevs:function attribute function-name

wlevs:adapter attribute manageable

Yes

N/A

None.

wlevs:channel attribute manageable

Yes

N/A

None.

wlevs:adapter attribute monitoring

N/A

Yes

None.

wlevs:channel attribute monitoring

N/A

Yes

None.

wlevs:processor attribute monitoring

N/A

Yes

None.


For information on deprecated Oracle CQL syntax, see:

24.1.2 Adapter Changes

The programming model for adapters has changed as follows:

Outbound Adapters

Adapters can now also be outbound; previously they were only inbound.

Lifecycle Callback Methods for Adapters

Spring tags for adapters now include attributes for setting lifecycle callback methods via the EPN assembly file.

Runnable Adapters

For adapters that want to run in a thread, their Java class should now implement com.bea.wlevs.ede.api.RunnableBean.

Adapter Factories

Programmers are no longer required to create an adapter factory when creating adapters. You only need to create an adapter factory if you want to share adapters among applications.

Publishing Adapter Providers

Adapter providers are factories for adapters that are published through the OSGi service registry.

Previously, the only way of advertising adapter providers was to use Spring-DM only, like this:

<osgi:service interface="com.bea.wlevs.ede.api.AdapterFactory" ref="myBean">
    <osgi:service-properties>
        <entry key="type" value="SocketAdapterType"/>
    </osgi:service-properties>
</osgi:service>

However, Spring-DM does not support exporting and importing an OSGi service in the same application so the above approach is deprecated.

Now, you should declare providers with the wlevs:factory tag like this:

<wlevs:factory provider-name="SocketAdapterType" ref="myBean">

This will work whether the adapters are in the same application or not.

Note that if your adapters and providers are collocated (both in the same application) using a provider is optional; you could just instantiate the adapter directly.

Failure to make this change may result in an application that fails to start and eventually times out.

StockTick Event Type Replaced by OracleStockTick

When using the loadgen adapter, note that the StockTick event is now named OracleStockTick.

24.1.3 New and Deprecated Options in the Deployer Tool

The -start and -stop commands of the Deployer tool have been deprecated.

When using the -install command to install an application, Oracle CEP automatically starts it after all internal initialization tasks have completed. Subsequently, if you stop and start the Oracle CEP server instance, the application is automatically stopped and started, respectively.

The Deployer tool has two new options: -suspend and -resume. Users should use -suspend to suspend a currently running application, and -resume for it to resume running.

"Deployer Command-Line Reference" in the Oracle CEP Administrator's Guide.

24.1.4 Changes in Management, Monitoring, and JMX

The management framework of Oracle CEP has been overhauled in this release.

Oracle CEP no longer supports the JRMP protocol. Instead, JMX clients must use the more secure MSA protocol for both local and remote access to the Oracle CEP JMX server. When you connect to the Oracle CEP JMX server that is running on localhost or on a remote host, you must always use the JMX URL service:jmx:msarmi://HOST-NAME:PORT/jndi/jmxconnector so that you are always using the MSA connector (where HOST-NAME is either localhost or the name of the remote host and PORT is the Oracle CEP server JNDI port).

For more information, see:

24.1.5 Using stopwlevs.cmd With Multiple Servers on the Same Host

Consider a scenario where you start two servers on the same host, for example, with server 1 listening on port 9002 and server 2 listening on port 9022. If you then use stopwlevs.cmd in the server 1 domain directory, the server listening on port 9002 is stopped. If you then use stopwlevs.cmd in the server 2 domain directory, the stop operation fails due to connection reset error.

Workaround: use the stopwlevs.cmd command line argument -url or -listenPort to specify a port other than 9002.

24.1.6 Monitor Service may Underestimate Latency For Application-Timestamped Channels

The monitor service may underestimate the latency time of events that are being processed through the CQL processor when application-timestamped channels are being used and is-totally-ordered is not enabled.

24.1.7 Connecting to Oracle CEP Server Using JConsole may Throw Benign Null Pointer Exceptions

When you connect to Oracle CEP server using JConsole (with or without the wlevsjconsole.cmd script), JConsole may throw a java.lang.NullPointerException.

Workaround: click OK in the exception dialog box and proceed. The exception does not affect the JMX connection or Oracle CEP server.

24.1.8 Variable Duration Non-Event Detection is not Supported in This Release

Fixed duration non-event pattern detection is supported in 11g Release 1 (11.1.1). When you create a query for fixed duration non-event detection, you may use the DURATION clause with constant value and time unit, such as DURATION 5 SECONDS, or just a constant value such as DURATION 5.

Variable duration non-event pattern detection is not supported in 11g Release 1 (11.1.1). That is, you may not use the DURATION clause with an arbitrary arithmetic expression, such as DURATION c1+4.

Recurring non-event pattern detection is supported in 11g Release 1 (11.1.1) but only for the fixed duration case. That is, you may use a DURATION clause with a MULTIPLES OF clause but only for a duration that is a constant value.

For documentation errata related to this issue, see Section 24.3.7, "Variable Duration Non-Event Detection is not Supported in This Release".

24.1.9 JMSAdapterMBean Getter Methods for New Connection and User and Password

Included per bug 8584664.

The following methods have been added to com.bea.wlevs.management.configuration.JMSAdapterMBean:

  • getConnectionUser

  • getConnectionPassword

  • getConnectionEncryptedPassword

The following attributes have been added to the wlevs_application_config.xsd element jms-adapter:

  • connection-user

  • connection-password

  • connection-encrypted-password

When Oracle CEP acquires the JNDI InitialContext, it uses the user and password (or encrypted-password) settings.

When Oracle CEP calls the createConnection method on the javax.jms.ConnectionFactory to create a connection to the JMS destination (JMS queue or topic), it uses the connection-user and connection-password (or connection-encrypted-password) settings, if configured. Otherwise, Oracle CEP uses the user and password (or encrypted-password) settings.

You can use the connection-user and connection-password (or connection-encrypted-password) settings in applications where one security provider is used for JNDI access and a separate security provider is used for JMS access.

24.2 Configuration Issues and Workarounds

This section describes configuration issues and their workarounds. It includes the following topics:

24.2.1 Accessing Signal Generation Dashboard With Firefox Version 3.0 on Windows

When accessing the signal generation example dashboard (at URL http://localhost:9002/signalgeneration/dashboard.html) using the Firefox browser version 3.0 on Windows, you will get an error when you click Start.

Workaround: use Internet Explorer version 7 to access the signal generation example dashboard.

24.2.2 Starting a Server in a Domain Without Deployed Applications

When you start a server in a domain with no deployed applications, the Server STARTED message may not appear in the command window from which you ran the server start script, even though the server has successfully started.

24.2.3 VPN Software and Multicast Traffic

Active VPN software is known to have unpredictable behavior on multicast traffic. Additionally, having both Cisco VPN and Nortel VPN installed breaks multicast traffic.

24.2.4 Starting Oracle CEP Visualizer With Firefox

When using Oracle CEP Visualizer with the Firefox browser (version 3.0, SSL, and JDK 1.6), the first time you access a Oracle CEP Visualizer page it will render slowly, sometimes up to 30 seconds.

24.2.5 Uploading Files Using Oracle CEP Visualizer With Firefox and SSL

When using Oracle CEP Visualizer, you may get an error if you try to upload a file using the Firefox browser and SSL.

This is a known problem (http://bugs.adobe.com/jira/browse/FP-226) with Adobe Flex that affects Oracle CEP Visualizer.

24.2.6 A Channel Cannot be a Foreign Stage When Connected to an Oracle CQL Processor

If a channel is connected to an Oracle CQL processor, it cannot be a foreign stage.

24.2.7 Exceptions Thrown When Using Oracle CEP Visualizer with FireFox

When using Oracle CEP Visualizer with FireFox:

  • Do not set the Jetty scratch directory to a path with a space in it. Doing so will cause FileNotFoundException.

  • Ignore EOFException thrown on the server side; these exceptions will not cause client side failure.

The startwlevs.sh server start script is located in the server directory under the main domain directory. For example, the default server directory of the HelloWorld domain is located in ORACLE_CEP_HOME/ocep_11.1/samples/domains/helloworld_domain/defaultserver, where ORACLE_CEP_HOME refers to the main Oracle CEP installation directory, such as /oracle_cep.

24.2.8 Multi-Byte Characters are not Supported by loadgen

The loadgen utility supports only ASCII characters. It does not support multi-byte character sets.

24.2.9 Oracle CEP Server Will not Start if the Keystore and Private Key Passwords are Different

The passwords for the keystore and the alias for the SSL private key must be the same. If they are not, the Oracle CEP Server will not start.

For more information, see Section 24.3.12, "Oracle CEP Server Will not Start if the Keystore and Private Key Passwords are Different".

24.3 Documentation Errata

This section describes documentation errata. It includes the following topics:

24.3.1 Installer File Names are Incorrect

The installer file names in the following sections are incorrect:

Table 24-3 lists the correct installer file names for each supported platform.

Table 24-3 Oracle CEP Installers

Platform Installer File Name

Windows 32-bit

ofm_ocep_windows_11.1.1.1.0_32_disk1_1of1.exe


24.3.2 Reference to Additional Oracle CEP Samples Missing

"Overview of the Samples Provided in the Distribution Kit" in the Oracle CEP Getting Started should include the following information:

"Additional Oracle CEP sample code can be found at http://www.oracle.com/technology/sample_code/products/event-driven-architecture".

24.3.3 Colt Aggregate Function Example Output Incomplete

"Functions: Colt Aggregate" in the Oracle CEP CQL Language Reference contains incomplete example output for the following functions:

  • AUTOCORRELATION

  • DURBINWATSON

  • HARMONICMEAN

  • SAMPLESTANDARDDEVIATION

  • TRIMMEDMEAN

24.3.4 User-Defined Single Row Function Does not Implement an Interface

The introductory paragraph in "How to Implement a User-Defined Single-Row Function" in the Oracle CEP CQL Language Reference reads:

"You implement a user-defined single-row function by implementing a Java class that implements the SingleElementFunction interface."

It should read:

"You implement a user-defined single-row function by implementing a Java class that provides a public constructor and a public method that is invoked to execute the function."

Step 2 of this procedure should read:

"Compile the user-defined function Java implementation class and register the class in your Oracle CEP application assembly file as Example 24-1 shows.

Example 24-1 Single-Row User Defined Function for an Oracle CQL Processor

<wlevs:processor id="testProcessor">
    <wlevs:listener ref="providerCache"/>
    <wlevs:listener ref="outputCache"/>
    <wlevs:cache-source ref="testCache"/>
    <wlevs:function function-name="mymod" exec-method=”execute” />
        <bean class="com.bea.wlevs.example.function.MyMod"/>
    </wlevs:function>
</wlevs:processor>

Specify the method that is invoked to execute the function using the wlevs:function element exec-method attribute. This method must be public and must be uniquely identifiable by its name (that is, the method cannot have been overridden).

For more information, see "wlevs:function" in the Oracle CEP IDE Developer's Guide for Eclipse."

24.3.5 JMS Adapter Properties Topic Missing

"Viewing and Changing the Configuration of a Stage" in the Oracle CEP Visualizer User's Guide is missing a topic on the JMS Adapter stage.

24.3.6 Configuring Severity for an Individual Module Procedure Missing Some Component Name Constants

"Configuring Severity for an Individual Module" in the Oracle CEP Administrator's Guide is missing some of the valid logging component name constants you can use. Table 24-4 provides the complete list.

Table 24-4 Logging Component Name Constants

Component Name Constant Description

Adapters

Applies to log messages from adapter instances running on the Oracle CEP server.

Cache

Applies to log messages from caching systems and cache instances running on the Oracle CEP server.

Channel

Applies to log messages from channels running on the Oracle CEP server.

CQLProcessor

Applies to log messages from Oracle CQL processors running on the Oracle CEP server.

EplProcessor

Applies to log messages from EPL processors running on the Oracle CEP server.

Ede

Applies to log messages from the Event-Driven Environment, the Oracle CEP server event-dispatching infrastructure.

EventTrace

When set to Info or Debug, allows you to trace events as they flow through the EPN for all applications. You can dynamically change the severity of this log key using Oracle CEP Visualizer.

At the Info severity, you see log messages like:

<May 26, 2009 5:53:49 PM PDT> <Info> <EventTrace> <BEA-000000> <Application [helloworld], Stage [helloworldOutputChannel] received insert event>

At the Debug severity, the log messages include details of the event:

<May 26, 2009 6:02:34 PM PDT> <Debug> <EventTrace> <BEA-000000> <Application [helloworld], Stage [helloworldOutputChannel] received insert event [HelloWorldEvent: HelloWorld - the current time is: 6:02:34 PM]>

Lifecycle

Applies to log messages from Oracle CEP server and application lifecycle operations.

Management

Applies to log messages from Oracle CEP server general JMX-related management API operations.

Monitor

Applies to log messages from the Oracle CEP server monitoring service.

Recplay

Applies to log messages from Oracle CEP server event recording and playback operations.

Spring

Applies to log messages from Spring container operations.

Stream

Applies to log messages from stream instances running on the Oracle CEP server.


24.3.7 Variable Duration Non-Event Detection is not Supported in This Release

"DURATION Clause" in the Oracle CEP CQL Language Reference describes using the DURATION clause for non-event detection. This section should distinguish between the following:

  • For fixed duration non-event detection, you use the DURATION clause with a constant value and time unit or just a constant value.

  • For variable duration non-event detection, you use the DURATION clause with an arbitrary arithmetic expression.

  • For recurring non-event detection, you use the DURATION clause with a MULTIPLES OF clause.

Fixed duration non-event pattern detection is supported in 11g Release 1 (11.1.1). When you create a query for fixed duration non-event detection, you may use the DURATION clause with constant value and time unit, such as DURATION 5 SECONDS, or just a constant value such as DURATION 5.

Variable duration non-event pattern detection is not supported in 11g Release 1 (11.1.1). That is, you may not use the DURATION clause with an arbitrary arithmetic expression, such as DURATION c1+4.

Recurring non-event pattern detection is supported in 11g Release 1 (11.1.1) but only for the fixed duration case. That is, you may use a DURATION clause with a MULTIPLES OF clause but only for a duration that is a constant value.

The title of "Non-Event Detection" in the Oracle CEP CQL Language Reference should read "Fixed Duration Non-Event Detection".

24.3.8 DURATION Clause Examples Incorrect

The following examples in "DURATION Clause" in the Oracle CEP CQL Language Reference are incorrect and should read as shown below:

  • Example 15-8 "MATCH_RECOGNIZE with DURATION Clause Stream Output"

    Timestamp   Tuple Kind  Tuple11000:      +           10,8825000:      +           10,38000:      +           10,1850000:      +           10,1962000:      +           10, 
    
  • Example 15-11 "MATCH_RECOGNIZE with DURATION MULTIPLES OF Clause Stream Output"

    Timestamp   Tuple Kind  Tuple 11000:     +           10,88,637 25000:     +           10,, 38000:     +           10,18,18 48000:     +           10,19,37 58000:     +           10,19,37 68000:     +           10,20,57 82000:     +           10,, 92000:     +           10,,102000:     +           10,,112000:     +           10,, 
    

The paragraph after Example 15-8:

"Now the further tuples that arrive until 11000 all match B. Since the duration is 10 we output a match at time 1000+10000=11000. Note that the last of the tuples that match B is chosen (the one with the value 15) since the greedy quantifier * in the pattern regular expression AB* suggests as many B matches as possible should be matched. Since the sequence of tuples from 1000 through 11000 match the pattern AB* and nothing else a match is reported at 11000."

Should read:

"Since the duration is 10 we output a match as soon as input at time 1000+10000=11000 is received (the one with the value 12). Since the sequence of tuples from 1000 through 9000 match the pattern AB* and nothing else a match is reported as soon as input at time 11000 is received."

24.3.9 Outer Join Operator "(+)" is Deprecated

"Comparison Conditions" in the Oracle CEP CQL Language Reference refers to the deprecated outer join operator (+). Oracle recommends that you not use the (+) join operator. Use the LEFT OUTER JOIN and RIGHT OUTER JOIN syntax described below.

"Outer Joins" in the Oracle CEP CQL Language Reference refers to the deprecated outer join operator (+). This section should read as follows:

An outer join extends the result of a simple join. An outer join returns all rows that satisfy the join condition and also returns some or all of those rows from one table for which no rows from the other satisfy the join condition.

Example 24-2 shows how to create a query q5 that uses a left outer join between streams S0, with schema (c1 integer, c2 float), and S1, with schema (c1 integer, c2 float).

Example 24-2 Outer Joins

<query id="q5"><![CDATA[ 
    SELECT a.c1+b.c1 
    FROM S0[range 5] AS a LEFT OUTER JOIN S1[range 3] AS b 
    ON b.c2 = a.c2
    WHERE b.c2 > 3
]]></query>

Use the ON clause to specify a join condition. Doing so lets you specify join conditions separate from any search or filter conditions in the WHERE clause.

You can perform the following types of outer join:

24.3.9.1 Left Outer Join

To write a query that performs an outer join of streams A and B and returns all stream elements from A (a left outer join), use the LEFT OUTER JOIN syntax in the FROM clause as Example 24-3 shows. For all stream elements in A that have no matching stream elements in B, Oracle CEP returns null for any select list expressions containing stream elements of B.

Example 24-3 Left Outer Joins

<query id="q5"><![CDATA[ 
    SELECT a.c1+b.c1 
    FROM S0[range 5] AS a LEFT OUTER JOIN S1[range 3] AS b 
    ON b.c2 = a.c2
    WHERE b.c2 > 3
]]></query>

24.3.9.2 Right Outer Join

To write a query that performs an outer join of streams A and B and returns all stream elements from B (a right outer join), use the RIGHT OUTER JOIN syntax in the FROM clause as Example 24-4 shows. For all stream elements in B that have no matching stream elements in A, Oracle CEP returns null for any select list expressions containing stream elements of A.

Example 24-4 Right Outer Joins

<query id="q5"><![CDATA[ 
    SELECT a.c1+b.c1 
    FROM S0[range 5] AS a RIGHT OUTER JOIN S1[range 3] AS b 
    ON b.c2 = a.c2
    WHERE b.c2 > 3
]]></query>

24.3.10 Patch Client Section is Missing

"Installing Oracle CEP" in the Oracle CEP Getting Started is missing information on using the patch client.

For more information, see Oracle Smart Update Installing Patches and Maintenance Packs.

24.3.11 Avoiding a Single Point of Failure for Oracle CEP Visualizer Access

The procedures in "Creating an Oracle CEP Multi-Server Domain Using Oracle CEP Native Clustering" in the Oracle CEP Administrator's Guide and "Creating an Oracle CEP Multi-Server Domain Using Oracle Coherence" in the Oracle CEP Administrator's Guide contain steps that read:

"To improve performance, consider disabling Oracle CEP Visualizer access on all but one server in the domain."

Should read:

"To avoid a single point of failure, consider enabling Oracle CEP Visualizer on a small subset of n machines in the domain. Note that enabling Oracle CEP Visualizer on a given Oracle CEP Server may impact the performance of the server depending on the Oracle CEP Visualizer workload."

24.3.12 Oracle CEP Server Will not Start if the Keystore and Private Key Passwords are Different

"Creating an Oracle CEP Standalone-Server Domain Using the Configuration Wizard in Graphical Mode" in the Oracle CEP Administrator's Guide step 11 reads:

"Enter and confirm the password for the Oracle CEP domain identity keystore.

By default, the password for the certificate private key will be the same as the identity keystore; if you want it to be different, uncheck Use Keystore Password and enter the private key password."

Should read:

"Enter and confirm the password for the Oracle CEP domain identity keystore.

By default, the password for the certificate private key will be the same as the identity keystore; the Oracle CEP Server will not start if otherwise. Do not uncheck Use Keystore Password and do not enter a private key password."

"Configuring SSL to Secure Network Traffic" in the Oracle CEP Administrator's Guide is missing the following procedure:

24.3.12.1 How to Create a Keystore Manually

By default, the Configuration Wizard creates a default key-store certificate file, called evsidentity.jks, in the DOMAIN_DIR/servername/ssl directory; its password is the same as that entered when creating a server with the Configuration Wizard. Optionally, you can manually create your own keystore.

To create a key-store manually:

  1. Use the JDK keytool command to generate a keystore:

    keytool -genkey -alias evsidentity -keyalg RSA -validity 10958 -keystore evsidentity.jks -keysize 1024
    
  2. Enter the keystore password, as prompted:

    Enter keystore password:
    
  3. Enter the keystore attributes, as prompted:

    What is your first and last name?
      [Unknown]:  CEP
    What is the name of your organizational unit?
      [Unknown]:  SOA
    What is the name of your organization?
      [Unknown]:  ORACLE
    What is the name of your City or Locality?
      [Unknown]:  SF
    What is the name of your State or Province?
      [Unknown]:  CA
    What is the two-letter country code for this unit?
      [Unknown]:  US
    Is CN=CEP, OU=SOA, O=ORACLE, L=SF, ST=CA, C=US correct?
      [no]:  y
    
  4. When prompted for a key password, do not enter a password; just press RETURN:

    Enter key password for <evsidentity>
            (RETURN if same as keystore password):
    

    Note:

    The Oracle CEP Server will not start unless the password for certificate private key is the same as the password for the identity keystore.
  5. Using your favorite XML editor, open the Oracle CEP server config.xml file.

    By default, the Configuration Wizard creates the config.xml file in the ORACLE_CEP_HOME/user_projects/domains/DOMAIN_DIR/servername/config directory, where ORACLE_CEP_HOME refers to the Oracle CEP installation directory (such as d:/oracle_cep), DOMAIN_DIR refers to the domain directory (such as my_domain), and servername refers to the server instance directory (such as server1).

  6. Configure the ssl element.

    Example 24-5 shows the default ssl element the Configuration Wizard creates.

    Example 24-5 Default ssl Element

    <ssl>
        <name>sslConfig</name>
        <key-store>KEYSTORE_PATH</key-store>
        <key-store-pass>
            <password>PASSWORD</password>
        </key-store-pass>
        <key-store-alias>KEYSTORE_ALIAS</key-store-alias>
        <key-manager-algorithm>SunX509</key-manager-algorithm>
        <ssl-protocol>TLS</ssl-protocol>
        <enforce-fips>false</enforce-fips>
        <need-client-auth>false</need-client-auth>
    </ssl>
    

    Where:

    • KEYSTORE_PATH is the file path to the keystore file (the file name is from the -keystore argument to the keytool command).

    • PASSWORD is the cleartext keystore password.

    • KEYSTORE_ALIAS is the keystore alias (from the -alias argument to the keytool command).

  7. Save and close the config.xml file.

  8. Encrypt the cleartext password in the key-store-pass element password child element of the config.xml file by using the encryptMSAConfig utility.

    See "The encryptMSAConfig Command-Line Utility" in the Oracle CEP Administrator's Guide.

24.3.13 Colt Functions DurbinWatson and sampleStandardDeviation are not Supported

Oracle CEP does not support Colt functions DurbinWatson and sampleStandardDeviation.

The following sections should be omitted:

24.3.14 Oracle CQL Built-In Function Names Must be Lower Case

In the following sections, all built-in function names should be lower case:

24.3.15 Adapter Example Source Uses Deprecated API

In "Event Sources and Event Sinks" in the Oracle CEP IDE Developer's Guide for Eclipse, should use the API StreamSink and RelationSink and StreamSource and RelationSource instead of the deprecated EventSource and EventSink API.

Similarily, the following areas of the Oracle CEP IDE Developer's Guide for Eclipse should also use the API StreamSink and RelationSink and StreamSource and RelationSource instead of the deprecated EventSource and EventSink API:

24.3.15.1 Implementing an Adapter or Event Bean as an Event Source

"Implementing an Adapter or Event Bean as an Event Source" in the Oracle CEP IDE Developer's Guide for Eclipse should read as follows:

This section describes how to create an inbound adapter that acts as an event source because it receives incoming data and generates events that it sends to the next component in the EPN. Because event beans are functionally the same, the guidelines also apply to programming event beans that act as event sources.

The inbound adapter class typically reads the stream of incoming data, such as from a market data feed, converts it into an Oracle CEP event type that is understood by the rest of the application, and sends the event to the next component in the network.

The following example shows the adapter class of the HelloWorld sample; see the explanation after the example for coding guidelines that correspond to the Java code in bold.

package com.bea.wlevs.adapter.example.helloworld;

import java.text.DateFormat;
import java.util.Date;

import com.bea.wlevs.ede.api.RunnableBean;
import com.bea.wlevs.ede.api.StreamSender;
import com.bea.wlevs.ede.api.StreamSource;
import com.bea.wlevs.event.example.helloworld.HelloWorldEvent;

public class HelloWorldAdapter implements RunnableBean, StreamSource {

    private static final int SLEEP_MILLIS = 300;

    private DateFormat dateFormat;
    private String message;
    private boolean suspended;

    private StreamSender eventSender;

    public HelloWorldAdapter() {
        super();
        dateFormat = DateFormat.getTimeInstance();
    }

    public void run() {
        suspended = false;
        while (!isSuspended()) { // Generate messages forever...

            generateHelloMessage();

            try {
                synchronized (this) {
                    wait(SLEEP_MILLIS);
                }
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private void generateHelloMessage() {
        String message = this.message + dateFormat.format(new Date());
        HelloWorldEvent event = new HelloWorldEvent();
        event.setMessage(message);
    
        eventSender.sendInsertEvent(event);
    }

    public void setEventSender(StreamSender sender) {
        eventSender = sender;
    }

    public synchronized void suspend() {
        suspended = true;
    }
 
    private synchronized boolean isSuspended() {
        return suspended;
    }
}

Follow these guidelines when programming the adapter Java class; code snippets of the guidelines are shown in bold in the preceding example:

  • Import the interfaces and classes of the Oracle CEP API:

    import com.bea.wlevs.ede.api.StreamSender;
    import com.bea.wlevs.ede.api.StreamSource;
    import com.bea.wlevs.ede.api.RunnableBean;
    

    Because the adapter is an event source it must implement the StreamSource interface. If you want the adapter to run in a thread, also implement RunnableBean. The StreamSender interface sends event types to the next component in your application network. For full details of these APIs, see Oracle CEP Java API Reference.

  • Import the application-specific classes that represent the event types used in the application:

    import com.bea.wlevs.event.example.helloworld.HelloWorldEvent
    

    The com.bea.wlevs.event.example.helloworld.HelloWorldEvent class is a JavaBean that represents the event type used in the application.

  • The adapter class must implement the StreamSource and RunnableBean interfaces because it is an event source and will run in its own thread:

    public class HelloWorldAdapter implements RunnableBean, StreamSource {
    

    The StreamSource interface provides the StreamSender that you use to send events.

  • Because the adapter implements the RunnableBean interface, your adapter must then implement the run() method:

    public void run() {...
    

    This is where you should put the code that reads the incoming data, such as from a market feed, and convert it into an Oracle CEP event type, and then send the event to the next component in the network. Refer to the documentation of your data feed provider for details on how to read the incoming data. See Section 14.2.2.2, "Accessing Third-Party JAR Files" for information about ensuring you can access the vendor APIs if they are packaged in a third-party JAR file.

    In the HelloWorld example, the adapter itself generates the incoming data using the generateHelloMessage() private method. This is just for illustrative purposes and is not a real-world scenario. The generateHelloMessage() method also includes the other typical event type programming tasks:

    HelloWorldEvent event = new HelloWorldEvent();
    event.setMessage(message);
    
    eventSender.sendInsertEvent(event);
    

    The HelloWorldEvent is the event type used by the HelloWorld example; the event type is implemented with a JavaBean and is registered in the EPN assembly file using the <wlevs:event-type-repository> tag. See Section 1.5, "Creating Oracle CEP Event Types" for details. The setMessage() method sets the properties of the event; in typical adapter implementations this is how you convert a particular property of the incoming data into an event type property. Finally, the StreamSender.sendEvent() method sends this new event to the next component in the network.

  • Because your adapter implements StreamSource, you must implement the setEventSender() method, which passes in the StreamSender that you use to send events:

    public void setEventSender(StreamSender sender) { ...
    
  • If, as is typically the case, your adapter implements SuspendableBean, you must implement the suspend() method that stops the adapter when, for example, the application is undeployed:

    public synchronized void suspend() throws Exception { ... 
    

24.3.15.2 Implementing an Adapter or Event Bean as an Event Sink

"Implementing an Adapter or Event Bean as an Event Sink" in the Oracle CEP IDE Developer's Guide for Eclipse should read as follows:

The following sample code shows a Spring bean from HelloWorld application that acts as an event sink; see the explanation after the example for the code shown in bold:

package com.bea.wlevs.example.helloworld;
 
import com.bea.wlevs.ede.api.StreamSink;
import com.bea.wlevs.event.example.helloworld.HelloWorldEvent;
 
public class HelloWorldBean implements StreamSink {
 
    public void onInsertEvent(Object event) {
        if (event instanceof HelloWorldEvent) {
            HelloWorldEvent helloWorldEvent = (HelloWorldEvent) event;
            System.out.println("Message: " + helloWorldEvent.getMessage());
        }   
    }
 
}

The programming guidelines shown in the preceding example are as follows:

  • Your bean must import the event type of the application, which in the HelloWorld case is HelloWorldEvent:

    import com.bea.wlevs.event.example.helloworld.HelloWorldEvent;
    
  • Your bean must implement the com.bea.wlevs.ede.api.StreamSink interface:

    public class HelloWorldBean implements StreamSink {...
    
  • The StreamSink interface has a single method that you must implement, onInsertEvent(java.lang.Object), which is a callback method for receiving events. The parameter of the method is an Object that represents the actual event that the bean received from the component that sent it the event:

    public void onInsertEvent(Object event)
    
  • The data type of the events is determined by the event type you registered in the EPN assembly file of the application. In the example, the event type is HelloWorldEvent; the code first ensures that the received event is truly a HelloWorldEvent:

    if (event instanceof HelloWorldEvent) {
        HelloWorldEvent helloWorldEvent = (HelloWorldEvent) event;
    

    This event type is a JavaBean that was configured in the EPN assembly file as shown:

    <wlevs:event-type-repository>
        <wlevs:event-type type-name="HelloWorldEvent">
           <wlevs:class>
             com.bea.wlevs.event.example.helloworld.HelloWorldEvent
           </wlevs:class>
        </wlevs:event-type>
    </wlevs:event-type-repository>
    

    See Section 1.4, "Creating the EPN Assembly File" for procedural information about creating the EPN assembly file, and Appendix D, "Schema Reference: EPN Assembly spring-wlevs-v11_0_0_0.xsd" for reference information.

  • Events are instances of the appropriate JavaBean, so you access the individual properties using the standard getXXX() methods. In the example, the HelloWorldEvent has a property called message:

    System.out.println("Message: " + helloWorldEvent.getMessage());
    

For complete API reference information about the Oracle CEP APIs described in this section, see the Oracle CEP Java API Reference.

24.3.15.3 com.bea.wlevs.management.Activate

"Example @Activate Annotation" in the Oracle CEP IDE Developer's Guide for Eclipse should read as follows:

package com.bea.wlevs.adapter.example.helloworld;
...
import com.bea.wlevs.configuration.Activate;
import com.bea.wlevs.ede.api.RunnableBean;
import com.bea.wlevs.ede.api.StreamSender;
import com.bea.wlevs.ede.api.StreamSource;
import com.bea.wlevs.event.example.helloworld.HelloWorldEvent;

public class HelloWorldAdapter implements RunnableBean, StreamSource {
...
    @Activate
    public void activateAdapter(HelloWorldAdapterConfig adapterConfig) {
        this.message = adapterConfig.getMessage();
    }
...
}

24.3.15.4 com.bea.wlevs.management.Prepare

"Example @Prepare Annotation" in the Oracle CEP IDE Developer's Guide for Eclipse should read as follows:

package com.bea.wlevs.adapter.example.helloworld;
...
import com.bea.wlevs.configuration.Prepare;
import com.bea.wlevs.ede.api.RunnableBean;
import com.bea.wlevs.ede.api.StreamSender;
import com.bea.wlevs.ede.api.StreamSource;
import com.bea.wlevs.event.example.helloworld.HelloWorldEvent;

public class HelloWorldAdapter implements RunnableBean, StreamSource {
...
    @Prepare
    public void checkConfiguration(HelloWorldAdapterConfig adapterConfig) {
        if (adapterConfig.getMessage() == null
                || adapterConfig.getMessage().length() == 0) {
            throw new RuntimeException("invalid message: " + message);
        }
    }
...
}

24.3.15.5 com.bea.wlevs.management.Rollback

"Example @Rollback Annotation" in the Oracle CEP IDE Developer's Guide for Eclipse should read as follows:

package com.bea.wlevs.adapter.example.helloworld;
...
import com.bea.wlevs.configuration.Rollback;
import com.bea.wlevs.ede.api.RunnableBean;
import com.bea.wlevs.ede.api.StreamSender;
import com.bea.wlevs.ede.api.StreamSource;
import com.bea.wlevs.event.example.helloworld.HelloWorldEvent;

public class HelloWorldAdapter implements RunnableBean, StreamSource {
...
    @Rollback
    public void rejectConfigurationChange(HelloWorldAdapterConfig adapterConfig) {
    }