Reference Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

XSD Schema Reference for Oracle CEP Files

This section contains information on the following subjects:

 


Component Configuration XSD Schemas

The following XSD schema files describe the structure of the XML files you use to configure Oracle Complex Event Processing (or Oracle CEP for short) components, such as the complex event processors and adapters. The wlevs_application_config.xsd schema imports the wlevs_base_config.xsd schema..

Example of a Component Configuration File

The following example shows the component configuration file for the HelloWorld sample application:

<?xml version="1.0" encoding="UTF-8"?>
<helloworld:config
xmlns:helloworld="http://www.bea.com/ns/wlevs/example/helloworld">
<processor>
<name>helloworldProcessor</name>
<rules>
<rule id="helloworldRule"><![CDATA[ select * from HelloWorldEvent retain 1 event ]]></rule>
</rules>
</processor>
  <adapter>
<name>helloworldAdapter</name>
<message>HelloWorld - the current time is:</message>
</adapter>
  <stream monitoring="true" >
<name>helloworldOutstream</name>
<max-size>10000</max-size>
<max-threads>2</max-threads>
</stream>
</helloworld:config>

 


EPN Assembly XSD Schema

You use the EPN assembly file to declare the components that make up your Oracle CEP application and how they are connected to each other, or in other words, the event processing network. The EPN assembly file is an extension of the standard Spring context file. You also use the file to register the Java classes that implement the adapter and POJO components of your application, register the event types that you use throughout your application and EPL rules, and reference in your environment the Oracle CEP-specific services.

See spring-wlevs.xsd for the full XSD Schema.

Example of a EPN Assembly File

The following XML file shows the EPN assembly file for the HelloWorld example:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:wlevs="http://www.bea.com/ns/wlevs/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.bea.com/ns/wlevs/spring
http://www.bea.com/ns/wlevs/spring/spring-wlevs.xsd">
    <!-- First, create and register the adapter (and factory) that generates hello world messages -->
<osgi:service interface="com.bea.wlevs.ede.api.AdapterFactory">
<osgi:service-properties>
<prop key="type">hellomsgs</prop>
</osgi:service-properties>
<bean class="com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapterFactory" />
</osgi:service>
    <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>
    <!-- Assemble EPN (event processing network) -->
    <!-- The adapter id is used by the configuration system, so needs to be well-known -->
    <wlevs:adapter id="helloworldAdapter" provider="hellomsgs" manageable="true">
<!-- This property is also configure by dynamic config -->
<wlevs:instance-property name="message" value="HelloWorld - the current time is:"/>
</wlevs:adapter>
    <!-- The processor id is used by the configuration system, so needs to be well-known -->
    <wlevs:processor id="helloworldProcessor" manageable="true" />
    <wlevs:stream id="helloworldInstream" manageable="true">
<wlevs:listener ref="helloworldProcessor"/>
<wlevs:source ref="helloworldAdapter"/>
</wlevs:stream>
    <!-- Manageable is so that we can monitor the event throughput -->
    <wlevs:stream id="helloworldOutstream" manageable="true">
<wlevs:listener>
<!-- Create business object -->
<bean class="com.bea.wlevs.example.helloworld.HelloWorldBean"/>
</wlevs:listener>
<wlevs:source ref="helloworldProcessor"/>
</wlevs:stream>
</beans>

 


Deployment XSD Schema

The deployment file for Oracle CEP is called deployments.xml and is located in the DOMAIN_DIR directory, where DOMAIN_DIR refers to the main domain directory. This XML file lists the OSGi bundles that have been deployed to the server.

See deployment..xsd for the full XSD Schema.

Example of a Deployment XML File

The following example shows the deployments.xml file for the sample FX domain:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wlevs="http://www.bea.com/ns/wlevs/deployment"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.bea.com/ns/wlevs/deployment
http://www.bea.com/ns/wlevs/deployment/deployment.xsd">
  <wlevs:deployment id="fxApp" state="start" location="file:applications/fx/com.bea.wlevs.example.fx_2.0.0.0.jar"/>
</beans>

 


Server Configuration XSD Schema

The Oracle CEP server configuration file, config.xml, is located in the DOMAIN_DIR/servername/config directory, where DOMAIN_DIR refers to the main domain directory and servername refers to a particular server instance. To change the configuration of an Oracle CEP instance, you can update this file manually and add or remove server configuration elements.

See wlevs_server_config.xsd for the full XSD Schema.

Example of a Server Configuration XML File

The following sample config.xml, from the BEA_HOME/user_projects/domains/wlevs30_domain/defaultserver template domain, shows how to configure some of these services:

<?xml version="1.0" encoding="UTF-8"?>
<n1:config xsi:schemaLocation="http://www.bea.com/ns/wlevs/config/server wlevs_server_config.xsd"
xmlns:n1="http://www.bea.com/ns/wlevs/config/server"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <netio>
<name>NetIO</name>
<port>9002</port>
</netio>
  <netio>
<name>sslNetIo</name>
<ssl-config-bean-name>sslConfig</ssl-config-bean-name>
<port>4098</port>
</netio>
  <work-manager>
<name>JettyWorkManager</name>
<min-threads-constraint>5</min-threads-constraint>
<max-threads-constraint>10</max-threads-constraint>
</work-manager>
  <jetty>
<name>JettyServer</name>
<network-io-name>NetIO</network-io-name>
<work-manager-name>JettyWorkManager</work-manager-name>
<secure-network-io-name>sslNetIo</secure-network-io-name>
</jetty>
  <rmi>
<name>RMI</name>
<http-service-name>JettyServer</http-service-name>
</rmi>
  <jndi-context>
<name>JNDI</name>
</jndi-context>
  <exported-jndi-context>
<name>exportedJndi</name>
<rmi-service-name>RMI</rmi-service-name>
</exported-jndi-context>
  <jmx>
<rmi-service-name>RMI</rmi-service-name>
<rmi-jrmp-port>9999</rmi-jrmp-port>
<jndi-service-name>JNDI</jndi-service-name>
<rmi-registry-port>1099</rmi-registry-port>
</jmx>
  <ssl>
<name>sslConfig</name>
<key-store>./ssl/dsidentity.jks</key-store>
<key-store-pass>
<password>changeit</password>
</key-store-pass>
<key-store-alias>ds</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>
  <http-pubsub>
<name>pubsub</name>
<path>/pubsub</path>
<pub-sub-bean>
<server-config>
<name>pubsubbean</name>
<supported-transport>
<types>
<element>long-polling</element>
</types>
</supported-transport>
<publish-without-connect-allowed>true</publish-without-connect-allowed>
</server-config>
<channels>
<element>
<channel-pattern>/evsmonitor</channel-pattern>
</element>
<element>
<channel-pattern>/evsalert</channel-pattern>
</element>
<element>
<channel-pattern>/evsdomainchange</channel-pattern>
</element>
</channels>
</pub-sub-bean>
</http-pubsub>
</n1:config> 

  Back to Top       Previous  Next