This chapter describes how to use the Oracle Complex Event Processing (Oracle CEP) IDE for Eclipse to create projects with which to develop event processing networks (EPNs), including EPN assembly files and component configuration files.
This chapter describes:
Section 4.7, "Managing Libraries and Other Non-Class Files in Oracle CEP Projects"
Section 4.8, "Configuring Oracle CEP IDE for Eclipse Preferences"
An Oracle CEP application includes the following artifacts:
Java source files
XML configuration files
OSGi bundle Manifest file
Figure 4-1 shows the Explorer after creating a project.
Table 4-1 summarizes the important files in an Oracle CEP project including their use and location.
Table 4-1 Oracle CEP Project Artifacts
File Type | Location | Description |
---|---|---|
Java source files |
Any Java source folder. Default: |
Events, adapters, and listeners are implemented in an Oracle CEP application with Java files. All Java files must be in a source folder in order to be compiled. For more information, see Chapter 1, "Overview of Creating Oracle CEP Applications". |
EPN assembly file |
|
These are the main files used to wire-up an EPN and to define event types. This is a Spring context file, and is where adapters, channels, processors, and listeners are connected. For more information, see Chapter 1, "EPN Assembly File". |
Processor configuration file |
|
The processor configuration file is where the Complex Event Processor (CEP) is defined. In this file you'll find processor rules (defined in the Continuous Query Language - CQL or the Event Processing Language--EPL) and other component configuration settings. For more information, see: |
|
|
The manifest file contains metadata about your application including its name, version, and dependencies, among others. For more information, see Chapter 24, "Assembling and Deploying Oracle CEP Applications". |
Development of an Oracle CEP application begins by creating a project to hold all source code and related files.
Projects correspond 1-to-1 with Oracle CEP applications and are the unit of work that is associated with and deployed to a server instance. In concrete terms, the output of a built project is a single OSGi bundle (JAR) containing the Oracle CEP application.
By default new projects are set to use Java 6.0. This section describes how to create an Oracle CEP project using Java 6. For information on configuring an Oracle CEP project to use Java 6, see Section 3.4, "Configuring Eclipse".
Note:
By default, the Overview view of the Eclipse manifest editor provides a link to launch the OSGi framework for testing the plugin. When you've created an Oracle CEP project using an application template, launching the framework is not supported.
To create an Oracle CEP project:
Open the EPN Editor (see Section 6.1, "Opening the EPN Editor")
Select File > New Project.
The New Project - Select a Wizard dialog appears as shown in Figure 4-2.
Figure 4-2 New Project - Select a Wizard Dialog
Expand Oracle CEP and select Oracle CEP Application Project.
Click Next.
The New Oracle CEP Application Project wizard appears as shown in Figure 4-3.
Figure 4-3 New Oracle CEP Application Project Wizard: Create an Oracle CEP Application
Configure the Create an Oracle CEP Application dialog as shown in Table 4-2.
Table 4-2 Create an Oracle CEP Application Dialog
Attribute | Description |
---|---|
Project name |
The name of your Oracle CEP project. This name will be used as the default name of your application when it is deployed to the Oracle CEP server. |
Location |
The directory in which your project is stored. By default your project is located inside the Eclipse workspace directory. To keep your workspace and source code control directories separate, clear Use default location and click Browse to place the project in a directory outside of your workspace. |
Target Runtime |
The Oracle CEP server you will deploy your project to. |
Click Next.
The Oracle CEP Application Content dialog appears as shown in Figure 4-4.
Figure 4-4 New Oracle CEP Application Project Wizard: Oracle CEP Application Content
Optionally, configure the Oracle CEP Application Content dialog as shown in Table 4-3.
Table 4-3 Oracle CEP Application Content Dialog
Attribute | Description |
---|---|
Bundle ID |
The unique ID that distinguishes this application's OSGi bundle from those deployed to the target runtime. |
Bundle Version |
The version of this instance of this OSGi bundle. |
Bundle Name |
The name of this application's OSGi bundle. |
Bundle Provider |
The name of the provider for this application's OSGi bundle (optional). |
Click Next.
The Template dialog appears as shown in Figure 4-5.
Figure 4-5 New Oracle CEP Application Project Wizard: Template Dialog
Optionally, select an Oracle CEP application template to pre-populate your project with the content that the template specifies.
Click Finish.
The Oracle CEP IDE for Eclipse creates the Oracle CEP project.
Optionally, create additional EPN assembly files and component configuration files.
By default, Oracle CEP IDE for Eclipse creates one EPN assembly file and one component configuration file for your project. Optionally, you may choose to define and configure Oracle CEP objects in multiple EPN assembly and component configuration files to improve management, concurrent development, and re-use.
For more information, see:
You use the Event Processing Network (EPN) assembly file to declare the components that make up your Oracle CEP application and how they are connected to each other. You also use the file to register event types of your application, as well as the Java classes that implement the adapter and POJO components of your application.
For an example of an EPN assembly file, see the "Foreign Exchange (FX) Example" in the Oracle Fusion Middleware Getting Started Guide for Oracle Complex Event Processing. For additional information about Spring and OSGi, see Appendix A, "Additional Information about Spring and OSGi."
The most efficient and least error-prone way to create and edit the EPN file is using the New File Wizard in the Oracle CEP IDE for Eclipse.
For more information, see:
To create a new EPN assembly file using Oracle CEP IDE for Eclipse:
Create an Oracle CEP project.
See Section 4.2, "Creating Oracle CEP Projects".
By default, Oracle CEP IDE for Eclipse creates one EPN assembly file for your project. Optionally, you may choose to define Oracle CEP objects in multiple EPN assembly files to improve management, concurrent development, and re-use.
To optionally create additional EPN assembly files:
Select File > New > Other.
The New dialog appears as Figure 4-6 shows.
Expand Oracle CEP and select Oracle CEP Assembly File.
Click Next.
The New CEP Assembly File dialog appears as Figure 4-7 shows.
Configure the New CEP Assembly File dialog as shown in Table 4-4.
Table 4-4 New CEP Assembly File Dialog
Attribute | Description |
---|---|
Enter or select the parent folder |
Enter the fully qualified path to the folder in which Oracle CEP IDE for Eclipse will create the EPN assembly file or use the file system navigation controls to select the folder. |
File name |
Enter the name of the new EPN assembly file. |
Click Finish.
Open the EPN editor.
If you created multiple EPN assembly files, you can select the EPN assembly file you want to work on using the EPN Editor Filter pull-down menu.
This lets you focus on just the subset of the EPN that the selected EPN assembly file represents.
To see the union of all components in all EPN assembly files, select Full EPN from the EPN Editor Filter pull-down menu.
For more information, see Section 6.2.2, "Filtering".
Create and connect nodes on the EPN.
You use a component configuration file to configure the components that make up your Oracle CEP application.
For an example of a component configuration file, see the "Foreign Exchange (FX) Example" in the Oracle Fusion Middleware Getting Started Guide for Oracle Complex Event Processing.
The most efficient and least error-prone way to create and edit a component configuration file is using the New File Wizard in the Oracle CEP IDE for Eclipse.
For more information, see:
To create a new component configuration file using Oracle CEP IDE for Eclipse:
Create an Oracle CEP project.
See Section 4.2, "Creating Oracle CEP Projects".
By default, Oracle CEP IDE for Eclipse creates one component configuration file for your project. Optionally, you may choose to configure Oracle CEP objects in multiple component configuration files to improve management, concurrent development, and re-use.
To optionally create component configuration files:
Select File > New > Other.
The New dialog appears as Figure 4-8 shows.
Expand Oracle CEP and select Oracle CEP Application Configuration File.
Click Next.
The New CEP Application Configuration File dialog appears as Figure 4-9 shows.
Figure 4-9 New CEP Application Configuration File Dialog
Configure the New CEP Assembly File dialog as shown in Table 4-4.
Table 4-5 New CEP Configuration File Dialog
Attribute | Description |
---|---|
Enter or select the parent folder |
Enter the fully qualified path to the folder in which Oracle CEP IDE for Eclipse will create the component configuration file or use the file system navigation controls to select the folder. |
File name |
Enter the name of the new component configuration file. |
Click Finish.
Open the EPN editor.
Create and connect nodes on the EPN.
Exporting an Oracle CEP project builds the project into an OSGi bundle that can be deployed to a production Oracle CEP server.
This section describes how to export an Oracle CEP project into an OSGi bundle.
To export an Oracle CEP project:
Start the Oracle CEP IDE for Eclipse and open your Oracle CEP project.
The Oracle CEP IDE for Eclipse compiles and adds Java resources to the exported JAR automatically. If your project contains other resources (such as a manifest file or images), configure your project to export them:
Locate the build.properties
file in the Project Explorer and double-click this file to edit it.
The build.properties
file opens as shown in Figure 4-10.
Figure 4-10 Oracle CEP Project build.properties File
In the Binary Build area, check the resources you want exported with your application.
The Export dialog appears as shown in Figure 4-11.
Expand the Oracle CEP option and select Oracle CEP Applications.
Click Next.
The Oracle CEP Applications Export: Select Project dialog appears as shown in Figure 4-12.
Figure 4-12 Oracle CEP Applications Export: Select Project Dialog
Configure the Oracle CEP Applications Export: Select Project dialog as shown in Table 4-6.
Table 4-6 Oracle CEP Application Content Dialog
Attribute | Description |
---|---|
Available Projects |
The list of Oracle CEP projects available for export. Check the project or projects you want to export. Each project will be exported to a JAR file with the name given in the Output File column. The name of the bundle that will be exported conforms to the OSGi bundle naming conventions, using the bundle ID and the bundle version in the JAR name. |
Directory |
The directory in which Oracle CEP project JAR files are exported. Click Browse to choose this directory. |
Overwrite existing files without warning |
Check this option to overwrite existing JAR files with the same name in the selected directory. |
Click Finish.
Your project, its Java resources, and any binary resources you selected are exported to the project JAR file.
Deploy the JAR file to your Oracle CEP server.
If your JAR is an application, see Section 5.3.6, "How to Deploy an Application to an Oracle CEP Server".
If your JAR is an application library, see Section 24.1.3, "Application Libraries"
Deploy other dependent resources, if any, to your Oracle CEP server.
For example:
Other OSGi bundles your application depends on.
Deploy these bundles on the Oracle CEP server using the Oracle CEP Visualizer or command line deployment tools.
Any entries in config.xml
for datasources that are referenced from within the application.
Add these entries to the target server's config.xml
file.
When upgrading Oracle CEP from one version to another, it may be necessary to make changes to your existing Oracle CEP projects.
This section describes:
Section 4.6.1, "How to Upgrade Projects from Oracle CEP 2.1 to 10.3"
Section 4.6.2, "How to Upgrade Projects from Oracle CEP 10.3 to 11g Release 1 (11.1.1)"
For more information, see:
While project structure has stayed the same since 2.1, the data stored in Oracle CEP Projects has changed significantly. It is therefore necessary to take steps to upgrade 2.1 projects manually before continuing their development in 10.3.
The following outlines the steps necessary to upgrade 2.1 projects to 10.3
To upgrade projects from Oracle CEP 2.1 to 10.3:
Open your Oracle CEP 2.1 project in Oracle CEP IDE for Eclipse.
Select File > Switch Workspace > Other.
The Workspace Launcher dialog appears as shown in Figure 4-13.
Note:
Do not choose to copy settings from the current workspace.
Click Browse and select a new workspace directory.
Eclipse exits and restarts using the new workspace.
Select File > Import.
The Import Dialog appears as shown in Figure 4-14.
Expand the General option and select Existing Projects into Workspace.
Click Next.
The Import Projects dialog appears as shown in Figure 4-15.
Use the Import Projects dialog to import your 2.1 projects into the new workspace. Optionally, choose to copy the project files into your new workspace.
For each project, change the project facet version as follows:
Right-click your project and select Properties.
The Project Properties dialog appears as shown in Figure 4-16.
Select the Project Facets option.
The Project Facet properties are displayed as Figure 4-16 shows.
Click Modify Project.
The Modify Faceted Project dialog appears shown in Figure 4-17.
For the Oracle CEP facet, select 10.3 from the Version pull-down menu.
Click Finish.
Click OK.
Repeat for the next project.
Create a new Oracle CEP server runtime:
Select Window > Preferences.
The Preferences dialog appears as shown in Figure 4-18.
Expand the Server option and select Installed Runtimes.
Add a new 10.3 Oracle CEP server runtime as Section 5.2.3, "How to Create an Oracle CEP Server Runtime" describes.
Click OK.
For each project, specify the new 10.3 Oracle CEP server runtime you created:
Right-click your project and select Properties.
The Project Properties dialog appears as shown in Figure 4-19.
Select the Targeted Runtimes option.
The Targeted Runtimes properties are displayed as Figure 4-19 shows.
Check the new Oracle CEP 10.3 targeted runtime you created.
Click OK.
Repeat for the next project.
For each project update the project builders:
Right-click the project and select Open EPN Editor.
If the EPN diagram opens without error, proceed to step 12.
If the EPN diagram opens with the error shown in Figure 4-20, click the Configure Builder button.
The EPN diagram is displayed.
Repeat for the next project.
If your application bundle is using bundle localization and has substitution variables in its MANIFEST.MF
file such as:
Bundle-Name: %project.name
Then your project root directory's build.properties
file element bin.include
must contain a reference to your bundle.properties
file such as:
bin.includes = META-INF/,\ bundle.properties,\ .
Perform source changes, if necessary.
For more information, see:
"Upgrading a WebLogic Event Server 2.0 Application to Run on Oracle CEP 10.3" in the Oracle Fusion Middleware Getting Started Guide for Oracle Complex Event Processing
Oracle CEP Release Notes for 10.3 (https://download.oracle.com/docs/cd/E13157_01/wlevs/docs30/notes/notes.html
)
After performing these steps, you should do a clean build of your project.
While project structure has stayed the same since 10.3, the data stored in Oracle CEP Projects has changed significantly. It is therefore necessary to take steps to upgrade 10.3 projects manually before continuing their development in 11g Release 1 (11.1.1).
The following outlines the steps necessary to upgrade 10.3 projects to 11g Release 1 (11.1.1)
To upgrade projects from Oracle CEP 10.3 to 11g Release 1 (11.1.1)
Open your Oracle CEP 10.3 project in Oracle CEP IDE for Eclipse.
Select File > Switch Workspace > Other.
The Workspace Launcher dialog appears as shown in Figure 4-21.
Click Browse and select a new workspace directory.
Note:
Do not choose to copy settings from the current workspace.
Eclipse exits and restarts using the new workspace.
Select File > Import.
The Import Dialog appears as shown in Figure 4-14.
Expand the General option and select Existing Projects into Workspace.
Click Next.
The Import Projects dialog appears as shown in Figure 4-15.
Use the Import Projects dialog to import your 10.3 projects into the new workspace. Optionally, choose to copy the project files into your new workspace.
For each project, change the project facet version as follows:
Right-click your project and select Properties.
The Project Properties dialog appears as shown in Figure 4-16.
Select the Project Facets option.
The Project Facet properties are displayed as Figure 4-16 shows.
Click Modify Project.
The Modify Faceted Project dialog appears shown in Figure 4-17.
For the Java facet, select 6.0 from the Version pull-down menu.
For the Oracle CEP facet, select 11.1 from the Version pull-down menu.
Click Finish.
Click OK.
Repeat for the next project.
Create a new Oracle CEP server runtime:
Select Window > Preferences.
The Preferences dialog appears as shown in Figure 4-18.
Expand the Server option and select Installed Runtimes.
Add a new 11.0 Oracle CEP server runtime as Section 5.2.3, "How to Create an Oracle CEP Server Runtime" describes.
Click OK.
For each project, specify the new 11.0 Oracle CEP server runtime you created:
Right-click your project and select Properties.
The Project Properties dialog appears as shown in Figure 4-19.
Figure 4-27 Project Properties Dialog: Targeted Runtimes
Select the Targeted Runtimes option.
The Targeted Runtimes properties are displayed as Figure 4-19 shows.
Check the new Oracle CEP 11.0 targeted runtime you created.
Click OK.
Repeat for the next project.
For each project update the project builders:
Right-click the project and select Open EPN Editor.
If the EPN diagram opens without error, proceed to step 12.
If the EPN diagram opens with the error shown in Figure 4-20, click the Configure Builder button.
The EPN diagram is displayed.
Repeat for the next project.
The Preferences dialog appears as shown in Figure 4-29.
Select the Validation option.
Ensure that the following validation options are checked:
CQL Validator
EPN Validator
XML Validator
Clear all other options.
Click OK.
Validate build inclusions:
If your application bundle is using bundle localization and has substitution variables in its MANIFEST.MF
file such as:
Bundle-Name: %project.name
Then your project root directory's build.properties
file element bin.include
must contain a reference to your bundle.properties
file such as:
bin.includes = META-INF/,\ bundle.properties,\ .
Perform source changes, if necessary.
For more information, see:
"Upgrading an Oracle CEP 10.3 Application to Run on Oracle CEP Release 11gR1 (11.1.1)" in the Oracle Fusion Middleware Getting Started Guide for Oracle Complex Event Processing
Many projects require the use of non-class files such as libraries or property files that were obtained from a source other than the project itself, whether that be third party libraries, internal libraries created in other projects, or otherwise.
You can add the following non-class files to an Oracle CEP project, each with its own packaging and deployment characteristics:
Standard JAR Files: Adding a standard JAR file to a project makes for the easiest management of the library. The library is packaged directly with the project by the Oracle CEP IDE for Eclipse and you can check the library into a source code control system as part of the project.
For more information, see:
OSGi Bundles: If your library is already packaged as an OSGi bundle and you would like to deploy it to the server once (allowing multiple applications to reference it), you can use the OSGi bundle library option. Note that this leaves some parts of deployment to the user since the OSGi bundle is not automatically packaged with the application. It can also make working in team environments a little more difficult because each developer must have the bundle in the DOMAIN_DIR
/
servername
/modules
directory of their machine, rather than have it source controlled with the rest of the project.
The main advantage of the OSGi bundle library option is that you can use the Oracle CEP server application library to manage OSGi bundle libraries to ensure that they are deployed before any applications that depend on them.
For more information, see:
Property Files: Adding a Java property file to a project allows you to manage properties efficiently. You can add a Java property file to an Oracle CEP project so that the property file is deployed with your application and is available at runtime.
For more information, see:
If the library you need to use is a standard JAR file, you can add it to your Oracle CEP project. Alternatively, you can add a library as an OSGi bundle (see Section 4.7.2, "How to Add an OSGi Bundle to an Oracle CEP Project").
When you add a standard JAR file to an Oracle CEP project, you can optionally expose some or all of its packages to other bundles that will depend on this bundle.
To add a standard JAR file to an Oracle CEP project:
Create a folder in your Oracle CEP IDE for Eclipse project to put the JAR file in.
Oracle recommends that you create a folder to put them in such as lib
.
To create a new folder, right-click your project folder and select New > Folder.
Outside of the Oracle CEP IDE for Eclipse, copy your JAR file into the lib
folder.
Inside the Oracle CEP IDE for Eclipse, right-click the lib
folder and select Refresh.
The JAR file appears in the lib
folder as Figure 4-30 shows.
Figure 4-30 Oracle CEP IDE for Eclipse lib Directory
Expand the META-INF
directory and right-click the MANIFEST.MF
file and select Open With > Plug-in Manifest Editor.
The Manifest Editor opens as Figure 4-31 shows.
Click the Build tab.
Add your JAR file to the binary build under the project root as follows:
In the Binary Build area, expand the lib
directory.
Check the box next to your library as Figure 4-31 shows.
Press hit CTRL-SHIFT-S
to save all files.
This edits the build.properties
file in your project, and tells the Oracle CEP IDE for Eclipse to add the JAR file to your bundle when you build the bundle JAR.
In the Manifest Editor, click the Runtime tab.
The Runtime tab appears as Figure 4-32 shows.
Figure 4-32 Manifest Editor - Runtime Tab
Add the JAR file to your project's classpath as follows:
In the Manifest Editor, click the Add button.
The JAR Selection dialog appears as shown in Figure 4-33.
Select the JAR you want to add to the bundle.
In this example, expand the lib directory and select the javax.jws_2.0.jar
file.
Click OK.
This adds the selected JAR to the Classpath list as Figure 4-34 shows.
Figure 4-34 Manifest Editor Runtime tab After Adding a JAR to the Classpath
Press hit CTRL-SHIFT-S
to save all files.
This edits the MANIFEST.MF
file, putting the JAR on your project classpath.
To confirm this, in the Manifest Editor, click the MANIFEST.MF tab and note that the JAR is now listed under the Bundle-Classpath
property as Figure 4-35 shows.
Figure 4-35 Manifest Editor MANIFEST.MF Tab
Note also that the JAR now appears as a library at the root of the project as Figure 4-36 shows.
Optionally, if your bundle needs to export packages from this JAR to other bundles that will depend on this bundle, then you can export these packages as Section 4.7.4, "How to Export a Package" describes.
If the library you need to use is an OSGi bundle, you can add it to your Oracle CEP project. Alternatively, you can add a library as a standard JAR file (see Section 4.7.1, "How to Add a Standard JAR File to an Oracle CEP Project").
To add an OSGi bundle to an Oracle CEP project, you add the bundle to that bundle's dependencies definition.
Note:
This process only makes the referenced bundle available to your project at build time. It does not package the bundle directly with your application when it is deployed or exported. Instead, this bundle must be deployed to the Oracle CEP server manually. For more information, see Section 24.1.3, "Application Libraries".
To add an OSGi bundle to an Oracle CEP project:
Place the OSGi bundle in the DOMAIN_DIR
/
servername
/modules
directory, where DOMAIN_DIR
refers to the domain directory such as /oracle_cep/user_projects/domains/mydomain
and servername
refers to the server instance, such as myserver
. For example:
c:\oracle_cep\user_projects\domains\mydomain\myserver\modules
Start the Oracle CEP IDE for Eclipse.
Right-click the project and select Refresh Targeted Runtime.
Right-click the META-INF/MANIFEST.MF
file and select Open With > Plug-in Manifest Editor.
The Manifest Editor opens as Figure 4-37 shows.
Figure 4-37 Manifest Editor: Dependencies Tab
Click the Dependencies tab.
In the Required Plug-ins area, click Add.
The Plug-in Selection dialog appears as shown in Figure 4-38.
Select the bundle you added to the DOMAIN_DIR
/
servername
/modules
directory of your Oracle CEP server installation directory in step 1 and click OK.
The selected bundle appears in the Require-Bundle section of the MANIFEST.MF
file.
You can add a Java property file to an Oracle CEP project so that the property file is deployed with your application and is available at runtime.
To add a property file to an Oracle CEP project:
Create a folder in your Oracle CEP IDE for Eclipse project to put the property files in.
Oracle recommends that you create a folder to put them in such as properties
.
To create a new folder, tight-click your project folder and select New > Folder.
Outside of the Oracle CEP IDE for Eclipse, copy your property file into the properties
folder.
Inside the Oracle CEP IDE for Eclipse, right-click the properties
folder and select Refresh.
The property file appears in the properties
folder as Figure 4-39 shows.
Figure 4-39 Oracle CEP IDE for Eclipse properties Directory
Expand the META-INF
directory and right-click the MANIFEST.MF
file and select Open With > Plug-in Manifest Editor.
The Manifest Editor opens as Figure 4-40 shows.
Click the Build tab.
Add your property file to the binary build under the project root as follows:
In the Binary Build area, expand the properties
directory.
Check the box next to your property file as Figure 4-40 shows.
Press hit CTRL-SHIFT-S
to save all files.
This edits the build.properties
file in your project, and tells the Oracle CEP IDE for Eclipse to add the property file to your bundle when you build the bundle JAR.
You can access the properties file in Java code as Example 4-1 shows:
Example 4-1 Accessing a Properties File
public void onInsertEvent(Object event) { if (event instanceof HelloWorldEvent) { HelloWorldEvent helloWorldEvent = (HelloWorldEvent) event; InputStream resourceAsStream = getClass().getClassLoader().getResourceAsStream( "properties/test.properties" ); Properties props = new Properties(); try { props.load(resourceAsStream); } catch (IOException e) { e.printStackTrace(); } System.out.println("Message: " + props.get("test-key")); // Throw com.bea.wlevs.ede.api.EventRejectedException to have exceptions propagated // up to senders. Other errors will be logged and dropped. } }
Optionally, if your bundle needs to export a package from a JAR to other bundles that will depend on this bundle, then you can export this package. By doing so, you update the Package-Export
MANIFEST entry to create an OSGi exporter for the package.
Inside the Oracle CEP IDE for Eclipse, expand the META-INF
directory as Figure 4-41 shows.
Figure 4-41 Oracle CEP IDE for Eclipse lib Directory
Right-click the MANIFEST.MF
file and select Open With > Plug-in Manifest Editor.
The Manifest Editor opens as Figure 4-42 shows.
Click the Runtime tab.
The Runtime tab appears as Figure 4-42 shows.
In the Exported Packages area, click the Add button.
The Package Selection dialog appears as Figure 4-43 shows.
Select the package you want to export.
To find a package in the list by name, type the name into the text field.
In this example, select the javax.jws.soap
package.
Click OK.
The selected package is added to the Exported Packages area as Figure 4-44 shows.
Figure 4-44 Manifest Editor Runtime tab After Exporting a Package
Press CTRL-SHIFT-S
to save all files.
Optionally, if your bundle needs to import a package from a JAR, then you can import this package. By doing so, you update the Package-Import
MANIFEST entry to create an OSGi importer for the package.
Inside the Oracle CEP IDE for Eclipse, expand the META-INF
directory as Figure 4-45 shows.
Figure 4-45 Oracle CEP IDE for Eclipse lib Directory
Right-click the MANIFEST.MF
file and select Open With > Plug-in Manifest Editor.
The Manifest Editor opens as Figure 4-46 shows.
Figure 4-46 Manifest Editor: Dependencies tab
Click the Dependencies tab.
The Dependencies tab appears as Figure 4-46 shows.
In the Imported Packages area, click the Add button.
The Package Selection dialog appears as Figure 4-47 shows.
Select the package you want to import.
To find a package in the list by name, type the name into the text field.
In this example, select the javax.jws.soap
package.
Click OK.
The selected package is added to the Import Packages area as Figure 4-48 shows.
Figure 4-48 Manifest Editor Dependencies tab After Importing a Package
Press CTRL-SHIFT-S
to save all files.
You can configure various preferences to customize Oracle CEP IDE for Eclipse to suit your needs, including:
Section 4.8.1, "How to Configure Application Library Path Preferences"
Section 4.8.2, "How to Configure Problem Severity Preferences"
You can define the path to an Oracle CEP server domain directory that contains application libraries that extend the Oracle CEP runtime.
For more information, see Section 24.3.1, "How to Define the Application Library Directory Using Oracle CEP IDE for Eclipse".
You can assign a severity to the various problems that Oracle CEP IDE for Eclipse can detect in your Oracle CEP project and application.
You can configure these preferences for each project individually or you can configure these preferences the same for all the projects in a given workspace.
To configure problem severity preferences:
Open the EPN Editor (see Section 6.1, "Opening the EPN Editor")
Select Window > Preferences.
The Preferences dialog appears as shown in Figure 4-49.
Select Oracle CEP Problem Severities.
Choose the configuration scope:
To configure problem severities for all the projects in a workspace, click Configure Workspace Settings.
The Oracle CEP Problem Severities dialog appears as Figure 4-50 shows.
Figure 4-50 Oracle CEP Problem Severities Dialog: Workspace
To configure problem severities for the current project only, click Enable project specific settings.
The Oracle CEP Problem Severities dialog appears as shown in Figure 4-51.
Figure 4-51 Oracle CEP Problem Severities Dialog: Project
Select a severity for each type of problem. You can select one of:
Error
: treat the problem as an error.
Warning
: treat the problem as a warning.
Ignore
: ignore the problem.
Table 4-7 describes each of the problem areas you can configure.
Table 4-7 Oracle CEP Problem Severities
Category | Problem | Description |
---|---|---|
Cache Configuration |
Unresolved cache loaders or resolved loaders with incorrect interface declarations. |
Ensure that the assembly file contains a For more information, see: |
Unresolved cache stores or resolved stores with incorrect interface declarations. |
Ensure that the assembly file contains a For more information, see: |
|
Event Processing Network |
Configuration objects without a matching assembly definition |
EPN configuration elements are linked to assembly definitions by name and ID, respectively. Validate that a configuration element has a name that exactly matches an assembly element by ID within the same application. |
Configuration objects with duplicate name declarations. |
Configuration elements in Oracle CEP configuration files are identified by a name. Validate that no two configuration elements in an application have the same name. |
|
Unresolved event listeners or resolved listeners with incorrect interface declarations |
An event processing network is built by defining how elements in the network pull or push to events to other elements in the application. Validate that the target of an event push, a listener declaration on an EPN assembly element, implements the interfaces required to receive pushed events. |
|
Unresolved event sources or resolved sources with incorrect interface declarations |
An event processing network is built by defining how elements in the network pull or push to events to other elements in the application. Validate that the source of an event pull, a source declaration on an EPN assembly element, implements the interfaces required to provide pulled events. |
|
Unresolved query selectors configured for channels. |
Given a channel with an upstream Oracle CQL processor that defines more than one rule, ensure that the channel component configuration file For more information, see Section D.82, "selector". |
|
References to foreign stages (stages defined in external applications). |
Ensure that references to foreign stages can be resolved. For more information, see Section 1.1.1.9, "Foreign Stages". |
|
Channels not associated with CQL processors missing "event-type" declaration. |
Given a channel that does not have an upstream Oracle CQL processor, ensure that the assembly file For more information, see Chapter 9, "Configuring Channels". |
|
Deprecated EPN elements |
Oracle CEP provides backwards compatibility with applications built for previous versions. Validate an application's use of deprecated XML elements. |
|
Event Type Repository |
Event property type values that are not predefined types or do not resolve to a known class. |
Event types may be defined using dynamic Spring Beans through the For more information, see Section 1.1.2, "Oracle CEP Event Types". |
Query Validation |
Problems found validating CQL Statements |
Validate that the Oracle CQL statement in a processor configuration is correct given the current application. Verify property names, event types, syntax, and other assembly-to-Oracle CQL references. |
Problems preventing the validation of CQL statements |
Some fundamental application errors will keep a Oracle CQL statement from being validated. For example, a processor configuration must have a matching processor assembly definition before any Oracle CQL requirements can be met. Verify that the minimum requirements are met to validate a processor's Oracle CQL statements. |
|
CQL statements affected directly or indirectly by missing binding parameters. |
Parameterized queries. |
|
CQL statements in disconnected processors (no upstream channels in the EPN). |
Ensure that all Oracle CQL processors are connected to an upstream stage on the EPN. Without an upstream stage, the Oracle CQL processor's rules have no event stream to operate on. |
Click Apply.
Click OK.