Assembling Applications With Foreign Stages

24-18 Oracle Complex Event Processing Developers Guide Figure 24–7 Preferences Dialog: Application Library Path With Path Variable

7. Click Apply.

8. Click OK.

24.3.2 How to Create an Application Library Using bundler.sh

This procedure describes how to create an OSGi bundle using the bundler utility. This is the preferred method. If you wish to manually configure the activator implementation, see Section 24.3.3, How to Create an Application Library Using Oracle CEP IDE for Eclipse . If you are creating an application library for a new JDBC driver, see How to Access a Database Driver Using an Application Library Built With bundler.sh in the Oracle Complex Event Processing Administrators Guide. Fo rmore information, see Section 24.1.3.3, Creating Application Libraries . To create an application library using bundler.sh: 1. Set up your environment as described in Setting Your Development Environment in the Oracle Complex Event Processing Getting Started.

2. Execute the bundler.sh script to create an OSGi bundle containing your driver.

The bundler.sh script is located in the ORACLE_CEP_HOMEocep_11.1bin directory, where ORACLE_CEP_HOME is the directory in which you installed the Oracle CEP server. Example 24–1 lists the bundler.sh command line options and Table 24–3 describes them. Assembling and Deploying Oracle CEP Applications 24-19 Example 24–1 bundler.sh Command Line Options bundler -source JAR -name NAME -version VERSION [-factory CLASS+] [-service INTERFACE+] [-fragmenthost HOST] [-stagedir PATH] [-targetdir PATH] [+import PACKAGE|REGEX+] [-imods REGEX;MODS+] [-import PACKAGE+] [+export PACKAGE|REGEX+] [-emods REGEX;MODS+] [-dimport PACKAGE+] [-explode] [-verbose] Table 24–3 bundler.sh Command Line Options Argument Description -source JAR The path of the source JAR file to be bundled. -name NAME The symbolic name of the bundle. The root of the target JAR file name is derived from the name value. -version VERSION The bundle version number. All exported packages are qualified with a version attribute with this value. The target JAR file name contains the version number. -factory CLASS+ An optional argument that specifies a space-delimited list of one or more factory classes that are to be instantiated and registered as OSGi services. Each service is registered with the OSGi service registry with name -name and version -version properties. This argument is incompatible with the -fragmenthost argument. -service INTERFACE+ An optional argument that specifies a space-delimited list of one or more Java interfaces that are used as the object class of each factory object service registration. If no interface names are specified, or the number of interfaces specified does not match the number of factory classes, then each factory object will be registered under the factory class name. -fragmenthost HOST An optional argument indicating that the resultant bundle is a fragment bundle and specifies the symbolic name of the host bundle. This argument is incompatible with the -factory argument. -stagedir PATH An optional argument that specifies where to write temporary files when creating the target JAR file. Default: .bundler.tmp -targetdir PATH An optional argument that specifies the location of the generated bundle JAR file. Default: current working directory .. +import PACKAGE|REGEX+ A space-delimited list of one or more packages or regular expressions that select the packages to exclude from the manifest Import-Package attribute. By default, all dependent packages will be imported except java.. -imods REGEX;MODS+ The import modifiers will be applied to the packages matching regular expression. -import PACKAGE Additional packages to include on the manifest Import-Package attribute. Note that any specified import modifiers will not be applied. +export PACKAGE|REGEX+ A space-delimited list of one or more packages or regular expressions that select the packages to exclude from the manifest Export-Package attribute. By default, all bundle packages will be exported. -emods REGEX;MODS+ The export modifiers will be applied to the packages matching regular expression. -dimport PACKAGE+ Packages to include on the manifest DynamicImport-Package attribute.