Configuring an Oracle Coherence Cache Store

Configuring Caching 12-27 is more than one caching system declared either implicitly or explicitly or if the caching system is in a different application or bundle. You can export both the caching system and the cache as an OSGI service using the advertise attribute. wlevs:caching-system id=caching-system-id advertise=true ... wlevs:cache id=cache-id name=alternative-cache-name advertise=true wlevs:caching-system ref=caching-system-id wlevs:cache If the cache is advertised, then a component in the EPN of an application in a separate bundle can then reference it. The following example shows how a processor in one bundle can use as a cache source the cache with ID cache-id located in a separate bundle called cacheprovider: wlevs:processor id=myProcessor2 wlevs:cache-source ref=cacheprovider:cache-id wlevs:processor The caching system is responsible for creating the cache associated with a particular name and returning a reference to the cache. The resulting cache bean implements the java.util.Map interface. 4. Configure the third-party caching system and its caches by updating the third-party caching configuration file or files for the application. Refer to your third-party cache documentation. 5. Optionally, override the default third-party cache configuration by updating the appropriate configuration file with one or more additional cache element child elements. ■ Specify that a cache is an event sink by configuring it as a listener to another component in the event processing network. Refer to your third-party cache documentation. ■ Specify that a cache is an event source to which another component in the event processing network listens. Refer to your third-party cache documentation. ■ Configure a cache loader or store. Refer to your third-party cache documentation. 6. Access the third-party cache: – Optionally reference the third-party cache in a query statement. See: Section 12.5, Accessing a Cache From an Oracle CQL Statement Section 12.6, Accessing a Cache From an EPL Statement – Optionally configure and program a custom adapter, business POJO, or Oracle CQL or EPL user-defined function to access the third-party cache. The configuration is done in the EPN assembly file and the programming is done in the Java file that implements the adapter, POJO, or user-defined function. See: 12-28 Oracle Complex Event Processing Developers Guide Section 12.7, Accessing a Cache From an Adapter Section 12.8, Accessing a Cache From a Business POJO Section 12.9, Accessing a Cache From an Oracle CQL User-Defined Function Section 12.10, Accessing a Cache From an EPL User-Defined Function – Optionally, access the third-party cache using JMX. See Section 12.11, Accessing a Cache Using JMX . 7. When you assemble your application, verify that the META-INFMANIFEST.MF file includes the following import as Figure 12–1 shows: com.bea.wlevs.cache.spi; version =11.1.0.0 If the MANIFEST.MF files does not include this import, update the MANIFEST.MF file to add this import before deploying your application. Figure 12–2 Editing the MANIFEST.MF File

12.5 Accessing a Cache From an Oracle CQL Statement

You can reference a cache from an Oracle CQL statement in much the same way you reference a channel; this feature enables you to enrich standard streaming data with data from a separate source. Example 12–11 shows a valid Oracle CQL query that joins trade events from a standard channel named S1 with stock symbol data from a cache named stockCache: