Sliding Windows Oracle CQL Query Restrictions

Configuring High Availability 21-3 ■ How to Create an Oracle CEP Multi-Server Domain With Default Groups Using Oracle Coherence in the Oracle Complex Event Processing Administrators Guide. ■ How to Create an Oracle CEP Multi-Server Domain With Custom Groups Using Oracle Coherence in the Oracle Complex Event Processing Administrators Guide. 2. Create an Oracle CEP application. For more information, see Section 4.2, Creating Oracle CEP Projects . 3. Edit the MANIFEST.MF file to add the following Import-Package entries: ■ com.bea.wlevs.ede.api.cluster ■ com.oracle.cep.cluster.hagroups ■ com.oracle.cep.cluster.ha.adapter ■ com.oracle.cep.cluster.ha.api For more information, see Section 4.7.2, How to Add an OSGi Bundle to an Oracle CEP Project . 4. Configure your Oracle CEP application EPN assembly file to add an Oracle CEP high availability buffering output adapter as Example 21–3 shows. ■ Add a wlevs:adapter element with provider set to ha-buffering after channel helloworldOutputChannel. ■ Update the wlevs:listener element in channel helloworldOutputChannel to reference the ha-buffering adapter by its id. ■ Add a wlevs:listener element to the ha-buffering adapter that references the HelloWorldBean class. Example 21–3 Simple Failover EPN Assembly File: Buffering Output Adapter ?xml version=1.0 encoding=UTF-8? beans ... wlevs:event-type-repository wlevs:event-type type-name=HelloWorldEvent wlevs:classcom.bea.wlevs.event.example.helloworld.HelloWorldEventwlevs:class wlevs:event-type wlevs:event-type-repository wlevs:adapter id=helloworldAdapter class=com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapter wlevs:instance-property name=message value=HelloWorld - the current time is: wlevs:adapter wlevs:channel id=helloworldInputChannel event-type=HelloWorldEvent wlevs:listener ref=helloworldProcessor wlevs:channel wlevs:processor id=helloworldProcessor wlevs:channel id=helloworldOutputChannel event-type=HelloWorldEvent advertise=true wlevs:listener ref=myHaSlidingWindowAdapter wlevs:source ref=helloworldProcessor wlevs:channel wlevs:adapter id=myHaSlidingWindowAdapter provider=ha-buffering 21-4 Oracle Complex Event Processing Developers Guide wlevs:listener bean class=com.bea.wlevs.example.helloworld.HelloWorldBean wlevs:listener wlevs:adapter beans 5. Optionally, configure the channel downstream from the input adapter helloworldInputChannel to configure an application timestamp based on an appropriate event property as Example 21–4 shows. For simple failover, you can use system timestamps because events are not correlated between servers. However, it is possible that slightly different results might be output from the buffer if application timestamps are not used. In this example, event property arrivalTime is used. The wlevs:expression should be set to this event property. Example 21–4 Application Timestamp Configuration ... wlevs:channel id=helloworldInputChannel event-type=HelloWorldEvent wlevs:listener ref=helloworldProcessor wlevs:source ref=myHaInputAdapter wlevs:application-timestamped wlevs:expressionarrivalTimewlevs:expression wlevs:application-timestamped wlevs:channel ... 6. Configure the Oracle CEP high availability buffering output adapter. Set the instance property windowLength to zero 0 as Example 21–5 shows. Example 21–5 Configuring windowLength in the Buffering Output Adapter ... wlevs:adapter id=myHaSlidingWindowAdapter provider=ha-buffering wlevs:listener bean class=com.bea.wlevs.example.helloworld.HelloWorldBean wlevs:listener wlevs:instance-property name=windowLength value=0 wlevs:adapter ... For more information, see Section 21.2.2.1, Buffering Output Adapter EPN Assembly File Configuration . 7. Optionally, configure the component configuration file to include the Oracle CEP high availability buffering output adapter as Example 21–6 shows. Example 21–6 Simple Failover Component Configuration File With High Availability Adapters ?xml version=1.0 encoding=UTF-8? wlevs:config xmlns:wlevs=http:www.bea.comnswlevsconfigapplication xmlns:ha=http:www.oracle.comnscepconfigcluster processor namehelloworldProcessorname rules query id=helloworldRule [CDATA[ select from helloworldInputChannel [Now] ]] query