Persistent Event Store Schema

Configuring Event Record and Playback 13-5

13.2.1 Configuring an Event Store for Oracle CEP Server

You may use the default Berkeley database configuration as is. You only need to make configuration changes to customize the location of the Berkeley database instance or to tune performance. For more information, see Section 13.3, Creating a Custom Event Store Provider . To configure an event store for Oracle CEP server: 1. Stop your Oracle CEP server instance, if it is running. 2. Using your favorite XML editor, open the servers config.xml file for edit. The config.xml file is located in the DOMAIN_DIRservernameconfig directory of your server, where DOMAIN_DIR refers to the domain directory, such as oracle_cepuser_projectsdomainsmyDomain and servername refers to the name of your server, such as defaultserver. 3. Edit the bdb-config element to the config.xml file. Example 13–1 shows a fully configured bdb-config element. Example 13–1 bdb-config Element bdb-config db-env-pathbdbdb-env-path cache-size1000cache-size bdb-config Table 13–1 lists the child elements of bdb-config that you can specify. 4. Restart your Oracle CEP server instance.

13.2.2 Configuring a Component to Record Events

You can configure any processor, adapter, channel, or event bean in your application to record events. As with all other component configuration, you specify that a component records events by updating its configuration file. For general information about these configuration files, see Section 1.1.5, Component Configuration Files. Table 13–1 Child Elements of bdb-config Child Element Description db-env-path Specifies the subdirectory in which Oracle CEP server creates Berkeley database instances relative to the the DOMAIN_ DIR servernameconfig directory of your server, where DOMAIN_ DIR refers to the domain directory, such as oracle_cepuser_ projectsdomainsmyDomain and servername refers to the name of your server, such as defaultserver. Default: bdb cache-size Specifies the amount of memory, in bytes, available for Berkeley database cache entries. You can adjust the cache size to tune Berkeley database performance. For more information, see: ■ http:www.oracle.comtechnologydocumentationberke ley-dbjeGettingStartedGuidecachesize.html . ■ http:www.oracle.comtechnologydocumentationberke ley-dbjejavacomsleepycatjeEnvironmentMutabl eConfig.htmlsetCacheSizelong Default: je.maxMemoryPercent JVM maximum memory 13-6 Oracle Complex Event Processing Developers Guide This section describes the main steps to configure a component to record events. For simplicity, it is assumed in the procedure that you are configuring an adapter to record events and that you have already created its component configuration file. See Section B.2, Component Configuration Schema wlevs_application_config.xsd for the complete XSD Schema that describes the event recording configuration file elements. Using your favorite XML editor, open the component configuration XML file and add a record-parameters child element to the component you want to configure to record events. For example, to configure an adapter called simpleEventSource: ?xml version=1.0 encoding=UTF-8? n1:config xmlns:n1=http:www.bea.comnswlevsconfigapplication xmlns:xsi=http:www.w3.org2001XMLSchema-instance adapter namesimpleEventSourcename record-parameters ... record-parameters ... adapter ... n1:config Add child elements to record-parameters to specify the name of the event store provider, the events that are stored, the start and stop time for recording, and so on. For example: adapter namesimpleEventSourcename record-parameters dataset-namerecplay_sampledataset-name event-type-list event-typeSimpleEventevent-type event-type-list batch-size1batch-size batch-time-out10batch-time-out record-parameters adapter Table 13–2 lists the child elements of record-parameters that you can specify. Only dataset-name is required. Table 13–2 Child Elements of record-parameters Child Element Description dataset-name Specifies the group of data that the user wants to group together. In the case of BDB provider, the dataset name will be used as the database environment in Berkeley database. In the case of the Oracle RDBMS-based provider, it specifies the database area, or schema, in which the tables that store the recorded events are created. When configuring the Oracle RDBMS-based provider, you are required to specify this element.