Apama Documentation : Deploying and Managing Apama Applications : Correlator Utilities Reference : Packaging correlator input files
Packaging correlator input files
The engine_package tool assembles EPL files, JAR files and event files into a correlator deployment package (CDP). You can inject a CDP file into the correlator just as you inject an EPL file or a JAR file containing a JMon application. CDP files use a proprietary, non-plaintext format that treats files in a manner similar to the way a JAR file treats a collection of Java files. In addition, using a CDP file guarantees that all files, assuming no errors, are injected and are injected in the correct order. See Injecting code into a correlator for details about how the correlator handles an error in a file that is in a CDP. See also Deploying a correlator for alternative ways to deploy the correlator or for creating CDPs from Software AG Designer projects.
While the names of events, monitors, aggregates, and JAR files that are contained in a CDP file are visible to the correlator utilities engine_inspect, engine_manage, and engine_delete, the code that defines them is not.
The executable for this tool is located in the bin directory of the Apama installation. Running the tool in the Apama Command Prompt (see Setting up the environment using the Apama Command Prompt) ensures that the environment variables are set correctly.
Synopsis
To package files into a CDP file, run the following command:
engine_package [ options ] [ file1 [ file2 ... ] ]
When you run this command with the –h option, the usage message for this command is shown.
Description
The engine_package tool creates a correlator deployment package (CDP). A CDP file contains one or more files. You specify the name of the CDP file to create as an argument to the -o option.
You can specify the files you want to include on the command line, or you can use the -m option and specify a manifest file that contains the names of the files. The manifest file is a text file; each line in the file specifies a relative or absolute path to a file. Files should be listed in the order in which you want them to be injected into the correlator.
You can also specify another CDP file to include in this package. The files from the original CDP are injected in the specified place in the order within this package.
Options
The engine_package tool takes the following options:
Option
Description
-h | --help
Displays usage information.
-V | --version
Displays version information for the engine_package tool.
-o filename | --output filename
Name of the CDP file to create. Required.
-m filename | --manifest filename
Name of the manifest file that lists the files you want to package.
-u | --utf8
Indicates that input files are in UTF-8 encoding. The default is that the engine_package tool assumes that the files to be packaged are in the native character set of your platform. Set the -u option to override this assumption. The engine_package tool then assumes that all input files are in UTF-8.
Operands
The engine_package tool takes the following operands:
Operand
Description
[ file1 [ file2 ... ] ]
The names of the EPL, JAR, event or other CDP files to be included in the package. The order in which these files are specified will become the order in which they are injected into the correlator when the CDP file is injected. Instead of listing the files on the command line, you can list them in a manifest file and use the -m option.
Exit status
The engine_package tool returns the following exit values:
Value
Description
0
Returned on success.
1
Returned on any error.
Example
The following example describes how to create a correlator deployment package file with multiple monitor files and inject the CDP file into a running correlator.
1. Create a manifest file containing a list of files to include in the CDP. For this example, the file is named manifest.txt and each line contains the full path name of an EPL file or JAR file:
c:\dev\sample\monitor1.mon
c:\dev\sample\monitor2.mon
C:\dev\sample\jmon-app.jar
2. To create the CDP file, call the engine_package tool stating the output filename and the manifest file to include in the CDP. (Note, instead of using a manifest file, you can list the files individually in the engine_package arguments.)
engine_package.exe -o c:\sample.cdp -m c:\dev\sample\manifest.txt
3. To inject the CDP file, call the engine_inject tool with -c (or --cdp). This injects each file that is included in the CDP file into the correlator.
engine_inject.exe -c c:\sample.cdp
Sample output from the correlator:
2012-07-11 13:51:33.156 INFO [3852] - Injected CDP from file
c:\sample.cdp (b2f097b02791e5dd4ac73cda38e153e9),
size 313 bytes, decoding and compile time 0.00 seconds
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback