How to Configure Oracle JDBC Data Cartridge Application Context
19.1 Overview of Extending Component Configuration
Adapters and event beans have default configuration data. This default configuration is typically adequate for simple and basic applications. However, you can also extend this configuration by using a XML Schema Definition XSD schema to specify a new XML format of an adapter configuration file that extends the built-in XML type provided by Oracle CEP. By extending the XSD Schema, you can add as many new elements to the adapter configuration as you want, with few restrictions other than each new element must have a name attribute. This feature is based on standard technologies, such as XSD and Java Architecture for XML Binding JAXB. You can extend component configuration by: ■ Annotating your adapter or event bean Java class with the annotations that javax.xml.bind.annotation specifies. See Section 19.1.1, Extending Component Configuration Using Annotations . ■ Manually generating an XSD. See Section 19.1.2, Extending Component Configuration Using an XSD . ■ Manually generating a custom schema which does not extend the application schema. This allows you to create custom configuration in your own namespace without having to define all the other elements. This mechanism functions like the annotation approach after you generate the schema. For more information, see: ■ Chapter 14, Configuring Custom Adapters ■ Chapter 15, Configuring Custom Event Beans ■ Section B.2, Component Configuration Schema wlevs_application_config.xsd 19-2 Oracle Complex Event Processing Developers Guide19.1.1 Extending Component Configuration Using Annotations
The simplest and most efficient way to extend component configuration is to annotate your adapter or event bean Java class using the annotations that javax.xml.bind.annotation specifies. Oracle CEP supports the inclusion of multiple namespaces in an EPN configuration file as well as supporting sourcing configuration information from the providing bundle rather than the client bundle. Oracle CEP scans for multiple ObjectFactories in the accessible class-space and each of these will be initialized through createConfig. The schema search takes into account the wlevs:factory element provider-schema child element in adapter bundles. So if you are defining an adapter in its own bundle you can put the schema in that bundle as long as you define the provider-bundle property. Oracle recommends that you use elementFormDefault=unqualified so that locally defined elements will not have a namespace, but global elements will leverage the targetNamespace. This will avoid name clashes across schemas without requiring excessive prefixing. For more information, see http:www.xfront.comHideVersusExpose.html . For more information, see: ■ Section 19.2.1, How to Extend Component Configuration Using Annotations ■ http:java.sun.comjavaee6docsapijavaxxmlbindannotation package-summary.html19.1.2 Extending Component Configuration Using an XSD
If you require more detailed control over your custom component configuration, you can extend your component configuration by creating your own XSD. For more information, see: ■ Section 19.2.2, How to Extend Component Configuration Using an XSD ■ https:jaxb.dev.java.net19.2 Extending Component Configuration
You can extend component configuration in either of the following ways: For more information, see Section 19.1, Overview of Extending Component Configuration .19.2.1 How to Extend Component Configuration Using Annotations
The simplest and most efficient way to extend component configuration is to annotate your adapter or event bean Java class. Alternatively, you can extend component configuration by creating your own XSD as Section 19.2.2, How to Extend Component Configuration Using an XSD describes. For more information, see Section 19.1.1, Extending Component Configuration Using Annotations . To extend component configuration using annotations: 1. Implement your custom adapter or event bean Java class. Extending Component Configuration 19-3 For more information, see: ■ Section 14.2, Implementing a Custom Adapter ■ Section 15.2, Implementing a Custom Event Bean 2. Annotate the attributes of your custom adapter or event bean to specify the component configuration using the annotations that javax.xml.bind.annotation specifies. Important javax.xml.bind.annotation annotations include: ■ XmlElement: property is an optional part of the component configuration. ■ XmlElementrequired=true: property is a required part of the component configuration. ■ XmlTransient: property is not part of the component configuration. ■ XmlJavaTypeAdapter: property elements annotated with this can specify custom handling to accomodate most Java data types. Example 19–1 shows a custom adapter implementation annotated with javax.xml.bind.annotation annotations to specify: ■ count: not part of the component configuration. ■ doit: required part of the component configuration. ■ size: required part of the component configuration; maps to instance property howBig. Example 19–1 Annotated Custom Adapter Implementation XmlTypename=SampleAdapterConfig, namespace=http:www.oracle.comnscepconfigsample public class SampleAdapterImpl implements Adapter { XmlTransient private int count; XmlElementname=size private int howBig; XmlElementrequired=true private boolean doit; ... public void setDoitboolean doit { this.doit = doit; } public boolean getDoit { return doit; } } Note: If you require extensive use of XmlJavaTypeAdapter, consider defining your own custom schema as Section 19.2.2, How to Extend Component Configuration Using an XSD describes. Note: A property without an annotation is assumed to be an optional configuration property default: XmlElement. 19-4 Oracle Complex Event Processing Developers Guide 3. Within your custom adapter or event bean code, access the extended configuration as Section 19.3, Programming Access to the Configuration of a Custom Adapter or Event Bean describes. 4. Modify the component configuration XML file that describes the custom components of your application. For more information, see Section 14.5, Configuring the Custom Adapter Component Configuration File . 5. When you create the component configuration XML file that describes the components of your application, be sure to use the extended XSD file as its description. In addition, be sure you identify the namespace for this schema rather than the default schema. Example 19–2 shows a component configuration file for the custom adapter in Example 19–1 . Example 19–2 Extended Component Configuration: Annotations ?xml version=1.0 encoding=UTF-8? app:config xmlns:app=http:www.bea.comnswlevsconfigapplication xmlns:sample=http:www.oracle.comnscepconfigsample xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation= http:www.bea.comnswlevsconfigapplication http:www.bea.comnswlevsconfigapplicationwlevs_application_config.xsd http:www.oracle.comnscepconfigsample http:www.oracle.comnscepconfigsampleocep_sample_config.xsd processor nameclusterProcessorname rules query id=clusterRule[CDATA[ select from clusterInstream [Now] ]]query rules processor sample:adapter namemyadaptername config size15size -- optional -- doittruedoit -- required -- config sample:adapter app:config 6. Package and deploy your application. For more information, see Chapter 24, Assembling and Deploying Oracle CEP Applications .19.2.2 How to Extend Component Configuration Using an XSD
You can extend the component configuration of a custom adapter or event bean using your own XSD. Alternatively, you can extend component configuration by annotating your adapter or event bean Java class as Section 19.2.1, How to Extend Component Configuration Using Annotations describes. Note: The extended component configuration schema requires a nested config element as Example 19–5 shows. Extending Component Configuration 19-5 For more information, see Section 19.1.2, Extending Component Configuration Using an XSD . To extend component configuration using an XSD: 1. Create the new XSD Schema file that describes the extended adapter or event bean configuration. This XSD file must also include the description of the other components in your application processors and streams, although you typically use built-in XSD types, defined by Oracle CEP, to describe them. See Section 19.2.2.1, Creating the XSD Schema File . 2. As part of your application build process, generate the Java representation of the XSD schema types using a JAXB binding compiler, such as the com.sun.tools.xjc.XJCTask Ant task from Suns GlassFish reference implementation. This Ant task is included in the Oracle CEP distribution for your convenience. The following sample build.xml file shows how to do this: property name=base.dir value=. property name=output.dir value=output property name=sharedlib.dir value={base.dir}..........modules property name=wlrtlib.dir value={base.dir}........modules path id=classpath pathelement location={output.dir} fileset dir={sharedlib.dir} include name=.jar fileset fileset dir={wlrtlib.dir} include name=.jar fileset path taskdef name=xjc classname=com.sun.tools.xjc.XJCTask classpath refid=classpath taskdef target name=generate depends=clean, init copy file=........xsdwlevs_base_config.xsd todir=srcmainresourcesextension copy file=........xsdwlevs_application_config.xsd todir=srcmainresourcesextension xjc extension=true destdir={generated.dir} schema dir=srcmainresourcesextension includes=helloworld.xsd produces dir={generated.dir} includes=.java xjc target In the example, the extended XSD file is called helloworld.xsd. The build process copies the Oracle CEP XSD files wlevs_base_config.xsd and wlevs_ application_config.xsd to the same directory as the helloworld.xsd file because helloworld.xsd imports the Oracle CEP XSD files. For more information, see https:jaxb.dev.java.netjaxb20-eadocsxjcTask.html . 3. Compile these generated Java files into classes. 4. Package the compiled Java class files in your application bundle. See Section 24.2, Assembling an Oracle CEP Application .Parts
» Oracle Fusion Middleware Online Documentation Library
» Adapter Components of the Oracle CEP Event Processing Network
» Channel Processor Components of the Oracle CEP Event Processing Network
» Event Bean Components of the Oracle CEP Event Processing Network
» Spring Bean Cache Components of the Oracle CEP Event Processing Network
» Table Nested Stages Components of the Oracle CEP Event Processing Network
» Foreign Stages Components of the Oracle CEP Event Processing Network
» Streams and Relations Transmitting Events in the EPN: Stream and Relation Sources and Sinks
» Transmitting Events in the EPN: Examples
» EPN Assembly File Overview of the Oracle CEP Programming Model
» Component Configuration Files Overview of the Oracle CEP Programming Model
» High Availability and Scalability
» Oracle CEP calls the ResumableBean.beforeResume method on all
» For each bean that implements RunnableBean, Oracle CEP starts it running in a
» Application state is now RUNNING.
» User Action: Uninstall Application
» User Action: Update Application
» User Action: Calling Methods of Stream and Relation Sources and Sinks
» Oracle CEP APIs Overview of the Oracle CEP Programming Model
» Creating an Oracle CEP Application
» Static Resource Names Static Resource Injection
» Dynamic Resource Names Static Resource Injection
» Dynamic Resource Injection Dynamic Resource Lookup Using JNDI
» Next Steps Oracle Fusion Middleware Online Documentation Library
» Event Type Instantiation and Immutability
» Event Types Specified as JavaBean or Java Class
» Event Types Specified as java.util.Map Event Types Specified as a Tuple
» Event Types for use With a Database Table Source
» Event Types for use With the csvgen Adapter
» Event Type and Serialization Creating Oracle CEP Event Types
» How to Create an Oracle CEP Event Type as a JavaBean Using the Event Type Repository Editor
» How to Create an Oracle CEP Event Type as a JavaBean Manually
» How to Create an Oracle CEP Event Type as a Tuple Using the Event Type Repository Editor
» How to Create an Oracle CEP Event Type as a Tuple Manually
» How to Create an Oracle CEP Event Type as a Java Class Manually
» How to Create an Oracle CEP Event Type as a java.util.Map
» Using an Event Type Builder Factory
» Sharing Event Types Between Application Bundles
» Installing the Latest Oracle CEP IDE for Eclipse
» Installing the Oracle CEP IDE for Eclipse Distributed With Oracle CEP
» Configuring Eclipse Oracle Fusion Middleware Online Documentation Library
» How to Create an Oracle CEP Project
» Oracle CEP Project Overview Select File New Other.
» How to Export an Oracle CEP Project
» In the Binary Build area, check the resources you want exported with your
» How to Add a Standard JAR File to an Oracle CEP Project
» How to Export a Package How to Import a Package
» How to Create a Remote Oracle CEP Server and Server Runtime
» How to Create an Oracle CEP Server Runtime
» How to Start a Local Oracle CEP Server
» How to Deploy an Application to an Oracle CEP Server
» How to Configure Connection and Control Settings for Oracle CEP Server
» How to Configure Domain Runtime Settings for Oracle CEP Server
» How to Start the Oracle CEP Visualizer from Oracle CEP IDE for Eclipse
» Right-click a server in the Servers view and select Debug.
» How to Open the EPN Editor from a Project Folder
» How to Open the EPN Editor from a Context or Configuration File
» Flow Representation Filtering EPN Editor Overview
» Zooming Layout Showing and Hiding Unconnected Beans
» Printing and Exporting to an Image Configuration Badging
» Link Specification Location Indicator
» Nested Stages EPN Editor Overview
» Event Type Repository Editor
» Hyperlinking in Component Configuration and EPN Assembly Files
» Hyperlinking in Oracle CQL Statements
» Type the keyboard short cut Ctrl-Alt-T.
» Right-click on an empty portion of the EPN Editor surface and select New from
» Laying Out Nodes Renaming Nodes Deleting Nodes
» Conversion Between JMS Messages and Event Types
» JMS Service Providers Outbound JMS Adapter
» How to Configure a JMS Adapter Using the Oracle CEP IDE for Eclipse
» How to Configure a JMS Adapter Manually
» How to Configure a JMS Adapter for Oracle WebLogic Server JMS Manually
» How to Configure a JMS Adapter for Tibco EMS JMS Manually
» How to Create a Custom Converter for the Inbound JMS Adapter
» How to Create a Custom Converter for the Outbound JMS Adapter
» How to Encrypt Passwords in the JMS Adapter Component Configuration File
» JMS Inbound Adapter EPN Assembly File Configuration
» JMS Outbound Adapter EPN Assembly File Configuration
» JMS Inbound Adapter Component Configuration
» JMS Outbound Adapter Component Configuration
» Local Publishing Overview of the Built-In Pub-Sub Adapter for Publishing
» Remote Publishing Overview of the Built-In Pub-Sub Adapter for Publishing
» Overview of the Built-In Pub-Sub Adapter for Subscribing
» Converting Between JSON Messages and Event Types
» How to Configure an HTTP Pub-Sub Adapter Using the Oracle CEP IDE for Eclipse
» How to Configure an HTTP Pub-Sub Adapter Manually
» HTTP Pub-Sub Adapter for Publising EPN Assembly File Configuration
» HTTP Pub-Sub Adapter for Subscribing EPN Assembly File Configuration
» HTTP Pub-Sub Adapter for Publising Component Configuration
» HTTP Pub-Sub Adapter for Subscribing Component Configuration
» Channels as Streams Channels Representing Streams and Relations
» Channels as Relations Channels Representing Streams and Relations
» System-Timestamped Channels Application-Timestamped Channels
» Controlling Which Queries Output to a Downstream Channel: selector
» Batch Processing Channels Overview of Channel Configuration
» EventPartitioner Channels Overview of Channel Configuration
» How to Configure a System-Timestamped Channel Using Oracle CEP IDE for Eclipse
» How to Configure an Application-Timestamped Channel Using Oracle CEP IDE for Eclipse
» How to Create a Channel Component Configuration File Manually
» Channel Component Configuration File Channel EPN Assembly File
» How to Configure an Oracle CQL Processor Using Oracle CEP IDE for Eclipse
» How to Create an Oracle CQL Processor Component Configuration File Manually
» How to Configure an Oracle CQL Processor Table Source Using Oracle CEP IDE for Eclipse
» Oracle CQL Processor Component Configuration File
» Oracle CQL Processor EPN Assembly File
» Configuring an Oracle CQL Processor Cache Source Overview of EPL Processor Component Configuration
» How to Configure an EPL Processor Manually
» Configuring an EPL Processor Cache Source
» EPL Processor Component Configuration File
» EPL Processor EPN Assembly File
» Use Case: Publishing Events to a Cache
» Use Case: Consuming Data From a Cache
» Use Case: Updating and Deleting Data in a Cache
» Use Case: Using a Cache in a Multi-Server Domain
» Additional Caching Features Overview of Oracle CEP Cache Configuration
» Caching APIs Overview of Oracle CEP Cache Configuration
» Specifying the Key Used to Index an Oracle CEP Local Cache
» Configuring an Oracle CEP Local Cache as an Event Source
» Configuring an Oracle CEP Local Cache Loader
» Configuring an Oracle CEP Local Cache Store
» The coherence-cache-config.xml File
» The tangosol-coherence-override.xml File
» Specifying the Key Used to Index an Oracle Coherence Cache
» Configuring an Oracle Coherence Cache as an Event Source
» Configuring an Oracle Coherence Cache Loader
» Configuring an Oracle Coherence Cache Store
» Configuring a Third-Party Caching System and Cache
» How to Access a Cache From an Oracle CQL Statement
» How To Access a Cache From an EPL Statement
» Accessing a Cache From an Adapter
» How to Access a Cache With JMX Using Oracle CEP Visualizer
» How to Access a Cache With JMX Using Java
» Default Persistent Event Store
» Custom Persistent Event Store
» Persistent Event Store Schema
» Querying Stored Events Overview of Configuring Event Record and Playback
» Configuring an Event Store for Oracle CEP Server
» Configuring a Component to Record Events
» Configuring a Component to Playback Events
» Starting and Stopping the Record and Playback of Events
» Description of the Berkeley Database Schema
» Accessing a Cache From an EPL User-Defined Function Creating a Custom Event Store Provider
» Custom Adapters as Event Sources Custom Adapters as Event Sinks
» How to Implement a Custom Adapter Using Ant
» Implementing a Custom Adapter as an Event Source
» Implementing a Custom Adapter as an Event Sink
» Implementing a Custom Adapter Factory
» How to Pass Static Login Credentials to the Data Feed Provider
» How to Pass Dynamic Login Credentials to the Data Feed Provider
» Configuring the Custom Adapter Component Configuration File
» Custom Event Beans as Event Sources
» Custom Event Beans as Event Sinks
» Implementing a Custom Event Bean as an Event Source
» Implementing a Custom Event Bean as an Event Sink
» Configuring the Custom Event Bean Component Configuration File
» Implementing a Custom Spring Bean as an Event Source
» Implementing a Custom Spring Bean as an Event Sink
» Declaring the Custom Spring Bean Components in your Application
» How to Expose an Oracle CEP Application as a Web Service
» How to Configure Oracle JDBC Data Cartridge Application Context
» Extending Component Configuration Using Annotations
» Extending Component Configuration Using an XSD
» How to Extend Component Configuration Using Annotations
» Creating the XSD Schema File
» Lifecycle Callback Annotations Lifecycle
» Rejoining the High Availability Multi-Server Domain
» Deployment Group and Notification Group
» High Availability Input Adapter
» Buffering Output Adapter High Availability Components
» Broadcast Output Adapter High Availability Components
» Correlating Output Adapter ActiveActiveGroupBean
» High Availability and Oracle Coherence
» Simple Failover Choosing a Quality of Service
» Simple Failover with Buffering
» Light-Weight Queue Trimming Choosing a Quality of Service
» Primary Oracle CEP High Availability Use Case
» Select the Minimum High Availability Your Application can Tolerate
» Use Oracle CEP High Availability Components at All Ingress and Egress Points
» Choose an Adequate warm-up-window Time Ensure Applications are Idempotent
» Source Event Identity Externally Understand the Importance of Event Ordering
» Range-Based Windows Oracle CQL Query Restrictions
» Tuple-Based Windows Oracle CQL Query Restrictions
» Partitioned Windows Oracle CQL Query Restrictions
» Sliding Windows Oracle CQL Query Restrictions
» DURATION Clause and Non-Event Detection
» Prefer Application Time Oracle CQL Query Restrictions
» How to Configure Simple Failover
» How to Configure Simple Failover With Buffering
» How to Configure Light-Weight Queue Trimming
» How to Configure Precise Recovery With JMS
» High Availability Input Adapter EPN Assembly File Configuration
» High Availability Input Adapter Component Configuration File Configuration
» Broadcast Output Adapter EPN Assembly File Configuration
» Broadcast Output Adapter Component Configuration File Configuration
» Correlating Output Adapter EPN Assembly File Configuration
» Correlating Output Adapter Component Configuration File Configuration
» How to Configure Scalability With the Default Channel EventPartitioner
» How to Configure Scalability With a Custom Channel EventPartitioner
» How to Configure Scalability in a JMS Application Without Oracle CEP High Availability
» How to Configure Scalability in a JMS Application With Oracle CEP High Availability
» How to Configure the ActiveActiveGroupBean Group Pattern Match
» Applications Overview of Application Assembly and Deployment
» Private Application Dependencies Application Dependencies
» Shared Application Dependencies Application Dependencies
» Library Directory Application Libraries
» Library Extensions Directory Application Libraries
» Creating Application Libraries Application Libraries
» Deployment and Deployment Order
» Configuration History Management Overview of Application Assembly and Deployment
» Assembling an Oracle CEP Application Using Oracle CEP IDE for Eclipse
» Creating the MANIFEST.MF File
» Assembling Applications With Foreign Stages
» How to Assemble a Custom Adapter in its Own Bundle
» How to Assemble a Custom Event Bean in its Own Bundle
» Click OK. How to Configure an Absolute Path
» How to Update an Application Library Using Oracle CEP IDE for Eclipse
» How to View an Application Library Using the Oracle CEP Visualizer
» Message Catalog Hierarchy Using Message Catalogs With Oracle CEP Server
» Guidelines for Naming Message Catalogs
» Using Message Arguments Using Message Catalogs With Oracle CEP Server
» Message Catalog Formats Using Message Catalogs With Oracle CEP Server
» Message Catalog Localization Using Message Catalogs With Oracle CEP Server
» How to Parse a Message Catalog to Generate Logger and TextFormatter Classes for Localization
» How to Deploy an Oracle CEP Application Using Oracle CEP IDE for Eclipse
» How to Deploy an Oracle CEP Application Using Oracle CEP Visualizer
» How to Deploy an Oracle CEP Application Using the Deployer Utility
» Overview of Testing Applications With the Load Generator and csvgen Adapter
» Configuring and Running the Load Generator Utility
» Creating a Load Generator Property File
» Configuring the csvgen Adapter in Your Application
» Event Inspector HTTP Publish-Subscribe Channel and Server
» How to Trace Events Using Oracle CEP Visualizer
» Scalability Using the ActiveActiveGroupBean
» Host Configuration High Availability Performance Tuning
» High Availability Input Adapter and Quality of Service
» High Availability Input Adapter Configuration
» Broadcast Output Adapter Configuration
» Oracle Coherence Heartbeat Frequency
» Oracle Coherence Serialization Oracle Coherence Performance Tuning Options
» Adapter Lifecycle Annotations OSGi Service Reference Annotations
» Example com.bea.wlevs.configuration.Activate
» Example com.bea.wlevs.configuration.Rollback
Show more