Custom Persistent Event Store

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